Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Job2 Class

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Represents a new base class for a job that provides extended state management functionality. Introduced in Windows PowerShell 3.0.

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


public ref class Job2 abstract : Job

NameDescription
System_CAPS_protmethodJob2()

Initializes a new instance of the Job2 class with the default options. Introduced in Windows PowerShell 3.0.

System_CAPS_protmethodJob2(String^)

Initializes a new instance of the Job2 class with the associated command string. Introduced in Windows PowerShell 3.0.

System_CAPS_protmethodJob2(String^, String^)

Initializes a new instance of the Job2 class with the associated command string and the friendly name of the job. Introduced in Windows PowerShell 3.0.

System_CAPS_protmethodJob2(String^, String^, Guid)

Initializes a new instance of the Job2 class with the associated command string, the friendly name of the job, and the global identifier of the job instance. Introduced in Windows PowerShell 3.0.

System_CAPS_protmethodJob2(String^, String^, IList<Job^>^)

Initializes a new instance of the Job2 class with the associated command string, the friendly name of the job, and the child jobs. Introduced in Windows PowerShell 3.0.

System_CAPS_protmethodJob2(String^, String^, JobIdentifier^)

Initializes a new instance of the Job2 class with the associated command string, the friendly name of the job, and the job identifier token. Introduced in Windows PowerShell 3.0.

NameDescription
System_CAPS_pubpropertyChildJobs

Gets a list of the child jobs included in this job. This property is introduced in Windows PowerShell 2.0.(Inherited from Job.)

System_CAPS_pubpropertyCommand

Gets the command that is run by this job. This property is introduced in Windows PowerShell 2.0.(Inherited from Job.)

System_CAPS_pubpropertyDebug

Gets and sets the buffer where debug information is stored. This property is introduced in Windows PowerShell 2.0.(Inherited from Job.)

System_CAPS_pubpropertyError

Gets and sets the buffer where error information is stored. This property is introduced in Windows PowerShell 2.0.(Inherited from Job.)

System_CAPS_pubpropertyFinished

Gets the wait handle that is signaled when job is finished. This property is introduced in Windows PowerShell 2.0.(Inherited from Job.)

System_CAPS_pubpropertyHasMoreData

Gets a Boolean value that indicates whether more data is available. This property is introduced in Windows PowerShell 2.0.(Inherited from Job.)

System_CAPS_pubpropertyId

Gets the identifier of the job. This property is introduced in Windows PowerShell 2.0.(Inherited from Job.)

System_CAPS_pubpropertyInformation

Gets or sets the information buffer. Information records of job are written to this buffer. (Inherited from Job.)

System_CAPS_pubpropertyInstanceId

Gets the identifier of this instance of the job. The instance identifier of the job is unique throughout all runspaces. This property is introduced in Windows PowerShell 2.0.(Inherited from Job.)

System_CAPS_pubpropertyJobStateInfo

Gets the status of the job. This property is introduced in Windows PowerShell 2.0.(Inherited from Job.)

System_CAPS_pubpropertyLocation

Gets the location of where the job is running. This property is introduced in Windows PowerShell 2.0.(Inherited from Job.)

System_CAPS_pubpropertyName

Gets and sets the name that can be used to identify the job. This property is introduced in Windows PowerShell 2.0.(Inherited from Job.)

System_CAPS_pubpropertyOutput

Gets and sets the output buffer for the job. This property is introduced in Windows PowerShell 2.0.(Inherited from Job.)

System_CAPS_pubpropertyProgress

Gets and sets the progress buffer for the job. This property is introduced in Windows PowerShell 2.0.(Inherited from Job.)

System_CAPS_pubpropertyPSBeginTime

Gets or sets when to begin the job. Introduced in Windows PowerShell 3.0.(Inherited from Job.)

System_CAPS_pubpropertyPSEndTime

Gets or sets when to end the job. Introduced in Windows PowerShell 3.0.(Inherited from Job.)

System_CAPS_pubpropertyPSJobTypeName

Gets or sets the job type name. Introduced in Windows PowerShell 3.0.(Inherited from Job.)

System_CAPS_pubpropertyStartParameters

Gets or sets the parameters that are used to start a job. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyStatusMessage

Gets the status message when the job is successful. This property is introduced in Windows PowerShell 2.0.(Inherited from Job.)

System_CAPS_protpropertySyncRoot

Object used for synchronization.Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyVerbose

Gets and sets the verbose buffer for the job. This property is introduced in Windows PowerShell 2.0.(Inherited from Job.)

System_CAPS_pubpropertyWarning

Gets and sets the warning buffer for the job. This property is introduced in Windows PowerShell 2.0.(Inherited from Job.)

NameDescription
System_CAPS_protmethodAutoGenerateJobName()

Automatically adds the specified job name if the user does not supply one when creating the job. This method is introduced in Windows PowerShell 2.0.(Inherited from Job.)

System_CAPS_pubmethodDispose()

Releases the resources used by the Job object. This method is introduced in Windows PowerShell 2.0.(Inherited from Job.)

System_CAPS_protmethodDispose(Boolean)

Releases the resources used by the Job object. This method is introduced in Windows PowerShell 2.0.(Inherited from Job.)

System_CAPS_protmethodDoLoadJobStreams()

Specifies the loading of the streams for a particular job. Introduced in Windows PowerShell 3.0.(Inherited from Job.)

System_CAPS_protmethodDoUnloadJobStreams()

Unloads job stream information, which enables jobs to clear stream information from memory. Introduced in Windows PowerShell 3.0.(Inherited from Job.)

System_CAPS_pubmethodEquals(Object^)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodLoadJobStreams()

Loads the required job streams. Introduced in Windows PowerShell 3.0.(Inherited from Job.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_protmethodOnResumeJobCompleted(AsyncCompletedEventArgs^)

Raises the event when resuming a suspended job is completed. Introduced in Windows PowerShell 3.0.

System_CAPS_protmethodOnStartJobCompleted(AsyncCompletedEventArgs^)

Raises the event when the starting of a job is completed. Introduced in Windows PowerShell 3.0.

System_CAPS_protmethodOnStopJobCompleted(AsyncCompletedEventArgs^)

Raises the event when the stopping of a job is completed. Introduced in Windows PowerShell 3.0.

System_CAPS_protmethodOnSuspendJobCompleted(AsyncCompletedEventArgs^)

Raises the event when the suspending of a job is completed. Introduced in Windows PowerShell 3.0.

System_CAPS_protmethodOnUnblockJobCompleted(AsyncCompletedEventArgs^)

Raises the event when the unblocking of a blocked job is completed. Introduced in Windows PowerShell 3.0.

System_CAPS_pubmethodResumeJob()

When overridden in a derived class, resumes a suspended job synchronously. Introduced in Windows PowerShell 3.0.

System_CAPS_pubmethodResumeJobAsync()

When overridden in a derived class, resumes a suspended job asynchronously. Introduced in Windows PowerShell 3.0.

System_CAPS_protmethodSetJobState(JobState)

Sets the status of the job, such as is it running, has it completed, or has it failed. This method is introduced in Windows PowerShell 2.0.(Inherited from Job.)

System_CAPS_protmethodSetJobState(JobState, Exception^)

Stores the state of the job. Introduced in Windows PowerShell 3.0.

System_CAPS_pubmethodStartJob()

When overridden in a derived class, starts a job synchronously. Introduced in Windows PowerShell 3.0.

System_CAPS_pubmethodStartJobAsync()

When overridden in a derived class, starts a job asynchronously. Introduced in Windows PowerShell 3.0.

System_CAPS_pubmethodStopJob()

Stops the job in all runspaces. This method is introduced in Windows PowerShell 2.0.(Inherited from Job.)

System_CAPS_pubmethodStopJob(Boolean, String^)

When overridden in a derived class, stops a job synchronously, with the option to force the action. Introduced in Windows PowerShell 3.0.

System_CAPS_pubmethodStopJobAsync()

When overridden in a derived class, stops a job asynchronously. Introduced in Windows PowerShell 3.0.

System_CAPS_pubmethodStopJobAsync(Boolean, String^)

When overridden in a derived class, stops a job asynchronously, with the option to force the action. Introduced in Windows PowerShell 3.0.

System_CAPS_pubmethodSuspendJob()

When overridden in a derived class, suspends a job synchronously. Introduced in Windows PowerShell 3.0.

System_CAPS_pubmethodSuspendJob(Boolean, String^)

When overridden in a derived class, suspends a job synchronously, with the option to force the action. Introduced in Windows PowerShell 3.0.

System_CAPS_pubmethodSuspendJobAsync()

When overridden in a derived class, suspends a job asynchronously. Introduced in Windows PowerShell 3.0.

System_CAPS_pubmethodSuspendJobAsync(Boolean, String^)

When overridden in a derived class, suspends a job asynchronously, with the option to force the action. Introduced in Windows PowerShell 3.0.

System_CAPS_pubmethodToString()

(Inherited from Object.)

System_CAPS_pubmethodUnblockJob()

When overridden in a derived class, unblocks a blocked job synchronously. Introduced in Windows PowerShell 3.0.

System_CAPS_pubmethodUnblockJobAsync()

When overridden in a derived class, unblocks a blocked job asynchronously. Introduced in Windows PowerShell 3.0.

System_CAPS_pubmethodUnloadJobStreams()

Unloads the required job streams. Introduced in Windows PowerShell 3.0.(Inherited from Job.)

NameDescription
System_CAPS_pubeventResumeJobCompleted

Occurs when the asynchronous resuming of a suspended job is completed. Introduced in Windows PowerShell 3.0.

System_CAPS_pubeventStartJobCompleted

Occurs when the start job activity is completed. Introduced in Windows PowerShell 3.0.

System_CAPS_pubeventStateChanged

Event fired when the status of the job changes, such as when the job has completed in all runspaces or failed in any one runspace. This event is introduced in Windows PowerShell 2.0.(Inherited from Job.)

System_CAPS_pubeventStopJobCompleted

Occurs when the asynchronous stopping of a job is completed. Introduced in Windows PowerShell 3.0.

System_CAPS_pubeventSuspendJobCompleted

Occurs when the asynchronous suspending of a job is completed. Introduced in Windows PowerShell 3.0.

System_CAPS_pubeventUnblockJobCompleted

Occurs when the asynchronous unblocking of a blocked job is completed. Introduced in Windows PowerShell 3.0.

Asynchronous support can be provided through two possible patterns:

  1. A classical pattern (Begin and End).

  2. An event-based pattern.

Unlike the PowerShell API, which uses the classical pattern, the Job API uses the event-based pattern.

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: