共用方式為


Job Constructors

Definition

Overloads

Job()

Default constructor.

Job(String)

Creates an instance of this class.

Job(String, String)

Creates an instance of this class.

Job(String, String, IList<Job>)

Creates an instance of this class.

Job(String, String, Guid)

Creates an instance of this class.

Job(String, String, JobIdentifier)

Creates an instance of this class.

Job()

Default constructor.

protected:
 Job();
protected:
 Job();
 Job();
protected Job ();
Protected Sub New ()

Applies to

Job(String)

Creates an instance of this class.

protected:
 Job(System::String ^ command);
protected:
 Job(Platform::String ^ command);
 Job(std::wstring const & command);
protected Job (string command);
new System.Management.Automation.Job : string -> System.Management.Automation.Job
Protected Sub New (command As String)

Parameters

command
String

Command invoked by this job object.

Applies to

Job(String, String)

Creates an instance of this class.

protected:
 Job(System::String ^ command, System::String ^ name);
protected:
 Job(Platform::String ^ command, Platform::String ^ name);
 Job(std::wstring const & command, std::wstring const & name);
protected Job (string command, string name);
new System.Management.Automation.Job : string * string -> System.Management.Automation.Job
Protected Sub New (command As String, name As String)

Parameters

command
String

Command invoked by this job object.

name
String

Friendly name for the job object.

Applies to

Job(String, String, IList<Job>)

Creates an instance of this class.

protected:
 Job(System::String ^ command, System::String ^ name, System::Collections::Generic::IList<System::Management::Automation::Job ^> ^ childJobs);
protected Job (string command, string name, System.Collections.Generic.IList<System.Management.Automation.Job> childJobs);
new System.Management.Automation.Job : string * string * System.Collections.Generic.IList<System.Management.Automation.Job> -> System.Management.Automation.Job
Protected Sub New (command As String, name As String, childJobs As IList(Of Job))

Parameters

command
String

Command invoked by this job object.

name
String

Friendly name for the job object.

childJobs
IList<Job>

Child jobs of this job object.

Applies to

Job(String, String, Guid)

Creates an instance of this class.

protected:
 Job(System::String ^ command, System::String ^ name, Guid instanceId);
protected Job (string command, string name, Guid instanceId);
new System.Management.Automation.Job : string * string * Guid -> System.Management.Automation.Job
Protected Sub New (command As String, name As String, instanceId As Guid)

Parameters

command
String

Command invoked by this job object.

name
String

Friendly name for the job object.

instanceId
Guid

InstanceId to be used for this job object.

Remarks

The InstanceId may need to be set to maintain job identity across instances of the process.

Applies to

Job(String, String, JobIdentifier)

Creates an instance of this class.

protected:
 Job(System::String ^ command, System::String ^ name, System::Management::Automation::JobIdentifier ^ token);
protected Job (string command, string name, System.Management.Automation.JobIdentifier token);
new System.Management.Automation.Job : string * string * System.Management.Automation.JobIdentifier -> System.Management.Automation.Job
Protected Sub New (command As String, name As String, token As JobIdentifier)

Parameters

command
String

Command invoked by this job object.

name
String

Friendly name for the job object.

token
JobIdentifier

Id and InstanceId pair to be used for this job object.

Remarks

The JobIdentifier is a token that must be issued by PowerShell to allow reuse of the Id. This is the only way to set either Id or instance Id.

Applies to