Skip to content

Stop-RSJob

SYNOPSIS

Stops a Windows PowerShell runspace job.

SYNTAX

Job (Default)

Stop-RSJob [[-Job] <RSJob[]>] [<CommonParameters>]

Name

Stop-RSJob [[-Name] <String[]>] [<CommonParameters>]

Id

Stop-RSJob [[-Id] <Int32[]>] [<CommonParameters>]

InstanceID

Stop-RSJob [-InstanceID <String[]>] [<CommonParameters>]

Batch

Stop-RSJob [-Batch <String[]>] [<CommonParameters>]

DESCRIPTION

Stops a Windows PowerShell background job that has been started using Start-RSJob

EXAMPLES

EXAMPLE 1

Get-RSJob -State Completed | Stop-RSJob

Description

Stop all jobs with a State of Completed.

EXAMPLE 2

Stop-RSJob -ID 1,5,78

Description

Stop jobs with IDs 1,5,78.

PARAMETERS

-Job

The job object to stop.

Type: RSJob[]
Parameter Sets: Job
Aliases: InputObject

Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name

The name of the jobs to stop..

Type: System.String[]
Parameter Sets: Name
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Id

The ID of the jobs to stop.

Type: System.Int32[]
Parameter Sets: Id
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-InstanceID

The GUID of the jobs to stop.

Type: System.String[]
Parameter Sets: InstanceID
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Batch

Name of the set of jobs to stop.

Type: System.String[]
Parameter Sets: Batch
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

Name: Stop-RSJob Author: Boe Prox/Max Kozlov

Back to top