Udostępnij za pośrednictwem


JobManager.NewJob Method

Definition

Overloads

NewJob(JobDefinition)

Creates a new job of the appropriate type given by JobDefinition passed in.

NewJob(JobInvocationInfo)

Creates a new job of the appropriate type given by JobDefinition passed in.

NewJob(JobDefinition)

Creates a new job of the appropriate type given by JobDefinition passed in.

public:
 System::Management::Automation::Job2 ^ NewJob(System::Management::Automation::JobDefinition ^ definition);
public System.Management.Automation.Job2 NewJob (System.Management.Automation.JobDefinition definition);
member this.NewJob : System.Management.Automation.JobDefinition -> System.Management.Automation.Job2
Public Function NewJob (definition As JobDefinition) As Job2

Parameters

definition
JobDefinition

JobDefinition defining the command.

Returns

Job2 object of the appropriate type specified by the definition.

Exceptions

If JobSourceAdapter type specified in definition is not registered.

JobSourceAdapter implementation exception thrown on error.

Applies to

NewJob(JobInvocationInfo)

Creates a new job of the appropriate type given by JobDefinition passed in.

public:
 System::Management::Automation::Job2 ^ NewJob(System::Management::Automation::JobInvocationInfo ^ specification);
public System.Management.Automation.Job2 NewJob (System.Management.Automation.JobInvocationInfo specification);
member this.NewJob : System.Management.Automation.JobInvocationInfo -> System.Management.Automation.Job2
Public Function NewJob (specification As JobInvocationInfo) As Job2

Parameters

specification
JobInvocationInfo

JobInvocationInfo defining the command.

Returns

Job2 object of the appropriate type specified by the definition.

Exceptions

If JobSourceAdapter type specified in definition is not registered.

JobSourceAdapter implementation exception thrown on error.

Applies to