Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 4.0 » Stop-Job

Stop-Job - Powershell 4.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »

Stop-Job

Short description
Stops a Windows PowerShell background job.

Syntax


Description
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-Job.


You can use Stop-Job to stop background jobs, such as those that were started by using the Start-Job cmdlet or the 
AsJob parameter of any cmdlet. When you stop a background job, Windows PowerShell completes all tasks that are pending 
in that job queue and then ends 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 the Remove-Job cmdlet.


Beginning in Windows PowerShell 3.0, Stop-Job also stops custom job types, such as workflow jobs and instances of 
scheduled jobs. To enable Stop-Job to stop a job with custom job type, import the module that supports the custom job 
type into the session before running a Stop-Job command, either by using the Import-Module cmdlet or by using or 
getting a cmdlet in the module. For information about a particular custom job type, see the documentation of the 
custom job type feature.