Contact Info

Crumbtrail

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

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

Get-Job


Short description
Gets Windows PowerShell background jobs that are running in the current session.

Syntax
Get-Job [-Command <string[]>] [<CommonParameters>]

Get-Job [[-InstanceId] <Guid[]>] [<CommonParameters>]

Get-Job [[-Name] <string[]>] [<CommonParameters>]

Get-Job [[-Id] <Int32[]>] [<CommonParameters>]

Get-Job [-State {NotStarted | Running | Completed | Failed | Stopped | Blocked}] [<CommonParameters>]

Description
The Get-Job cmdlet gets objects that represent the background jobs that were started in the current session. You ca
n use Get-Job to get jobs that were started by using Start-Job, or by using the AsJob parameter of any cmdlet. 

Without parameters, a "Get-Job" command gets all jobs in the current session. You can use the parameters of Get-Job
 to get particular jobs.

The job object that Get-Job returns contains useful information about the job, but it does not contain the job resu
lts. To get the results, use the Receive-Job cmdlet.

A Windows PowerShell background job is a command that runs "in the background" without interacting with the current
 session. Typically, you use a background job to run a complex command that takes a long time to complete. For more
 information about background jobs in Windows PowerShell, see about_Jobs.