Contact Info

Crumbtrail » Administration » Powershell » Powershell 2.0 » Remove-Job

Remove-Job - Powershell 2.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 »


Short description
Deletes a Windows PowerShell background job.

Remove-Job [-Id] <Int32[]> [-Force] [-Confirm] [-WhatIf] [<CommonParameters>]

Remove-Job [-Command <string[]>] [-Confirm] [-WhatIf] [<CommonParameters>]

Remove-Job [[-InstanceId] <Guid[]>] [-Force] [-Confirm] [-WhatIf] [<CommonParameters>]

Remove-Job [-Job] <Job[]> [-Force] [-Confirm] [-WhatIf] [<CommonParameters>]

Remove-Job [[-Name] <string[]>] [-Force] [-Confirm] [-WhatIf] [<CommonParameters>]

Remove-Job [-State {NotStarted | Running | Completed | Failed | Stopped | Blocked}] [-Confirm] [-WhatIf] [<CommonPa

The Remove-Job cmdlet deletes Windows PowerShell background jobs that were started by using Start-Job or the AsJob 
parameter of any cmdlet.

You can use this cmdlet to delete all jobs or delete selected jobs based on their name, ID, instance ID, command, o
r state, or by passing a job object to Remove-Job. Without parameters or parameter values, Remove-Job has no effect

Before deleting a running job, use the Stop-Job cmdlet to stop the job. If you try to delete a running job, the com
mand fails. You can use the Force parameter of Remove-Job to delete a running job.

If you do not delete a background job, the job remains in the global job cache until you close the session in which
 the job was created.