Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 2.0 » Remove-Job

Remove-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.

Remove-Job


Short description
Deletes a Windows PowerShell background job.

Syntax
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
rameters>]

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