Job Constructor

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Creates a new Job object. This constructor is introduced by Windows PowerShell 2.0.

Namespace:   System.Management.Automation
Assembly:  System.Management.Automation (in System.Management.Automation.dll)

NameDescription
System_CAPS_protmethodJob()

Creates a new Job object that is empty. This constructor is introduced by Windows PowerShell 2.0.

System_CAPS_protmethodJob(String)

Creates a new Job object that contains the command to be run. This constructor is introduced by Windows PowerShell 2.0.

System_CAPS_protmethodJob(String, String)

Creates a new Job object that contains the command to be run and the name of the job. This constructor is introduced by Windows PowerShell 2.0.

System_CAPS_protmethodJob(String, String, Guid)

Initializes a new instance of the Job class that contains the command to be run, the name of the job, and the instance. Introduced in Windows PowerShell 3.0.

System_CAPS_protmethodJob(String, String, IList<Job>)

Creates a new Job object that contains the command to be run, the name of the job, and any child jobs. This constructor is introduced by Windows PowerShell 2.0.

System_CAPS_protmethodJob(String, String, JobIdentifier)

Initializes a new instance of the Job class that contains the command to be run, the name of the job, and the job identifier. Introduced in Windows PowerShell 3.0.

The command run by the job can contain cmdlets, functions, scripts, or any other command-based tasks. It is designed to run commands that take an extended amount of time to complete, but it can run any command in the background.

Jobs are executed within their own runspaces, and those runspaces can exist on the local computer or any number of remote computers. See the ChildJobs property for more information about jobs that run on multiple runspaces.

Return to top

Community Additions

ADD
Show: