Contact Info

Crumbtrail » Administration » Powershell » Powershell 2.0 » Stop-Job

Stop-Job - Powershell 2.0 CmdLet

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.


Short description
Stops a Windows PowerShell background job.

Stop-Job [[-InstanceId] <Guid[]>] [-PassThru] [-Confirm] [-WhatIf] [<CommonParameters>]

Stop-Job [-Job] <Job[]> [-PassThru] [-Confirm] [-WhatIf] [<CommonParameters>]

Stop-Job [[-Name] <string[]>] [-PassThru] [-Confirm] [-WhatIf] [<CommonParameters>]

Stop-Job [-Id] <Int32[]> [-PassThru] [-Confirm] [-WhatIf] [<CommonParameters>]

Stop-Job [-State {NotStarted | Running | Completed | Failed | Stopped | Blocked}] [-PassThru] [-Confirm] [-WhatIf] 

The Stop-Job cmdlet stops Windows PowerShell background jobs that are in progress. You can use this cmdlet to stop 
all jobs or stop selected jobs based on their name, ID, instance ID, or state, or by passing a job object to Stop-J

You can use Stop-Job to stop jobs that were started by using Start-Job or the AsJob parameter of Invoke-Command. Wh
en you stop a background job, Windows PowerShell completes all tasks that are pending in that job queue and then en
ds the job. No new tasks are added to the queue after this command is submitted. 

This cmdlet does not delete background jobs. To delete a job, use Remove-Job.