Stop-WASJobInstance

Applies To: Windows 8, Windows Server 2012

Stop-WASJobInstance

Cancels the specified job instance. The JobInstance parameter is required.

Syntax

Parameter Set: Default
Stop-WASJobInstance [-JobInstance] <WASJobInstance[]> [ <CommonParameters>]

Detailed Description

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

Parameters

-JobInstance<WASJobInstance[]>

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.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

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

Examples

Cancel all job instances for the specified job

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.

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

PS C:\> $JobInstance = Get-WasJobInstance -Job $Job

PS C:\> Stop-WasJobInstance $JobInstance

Get-WASJob

Get-WASJobInstance

Windows Assessment Services Technical Reference