Stop-WASJobInstance
Cancels the specified job instance. The JobInstance parameter is required.
Syntax
Stop-WASJobInstance
[-JobInstance] <WASJobInstance[]>
[<CommonParameters>]
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: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Related Links
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for