次の方法で共有


Stop-WASJobInstance

Stop-WASJobInstance

Cancels the specified job instance.

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 (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1 - 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