Stop-WASJobInstance

Cancels the specified job instance.

Syntax

Stop-WASJobInstance
    [-JobInstance] <WASJobInstance[]>

Description

The Stop-WASJobInstance cmdlet cancels the specified job instance. The JobInstance parameter is required.

Examples

Example 1 - Cancel all job instances for the specified job

PS C:\> $Job = Get-WasJob -JobID '88fa238c-e83c-44f6-afd8-c0b640059422'
PS C:\> $JobInstance = Get-WasJobInstance -Job $Job
PS C:\> Stop-WasJobInstance $JobInstance

This command gets a job based on the JobID, saves it to a variable, and then gets the job instances for that job. The final command cancels all the job instances for the specified job.

Parameters

-JobInstance

Specifies the job instances you want to cancel. This is a required parameter. To get a list of job instances associated with a job, use the Get-WASJobInstance cmdlet.

Type:WASJobInstance[]
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False