Job Members

Serves as a base class for objects that represents a background job. A background job runs a command that can contain a command or expression. The job is run asynchronously within its own runspace. This class is introduced in Windows PowerShell 2.0.

The following tables list the members exposed by the Job type.

  Name Description
  Job Overloaded. Creates a new Job object. This constructor is introduced by Windows PowerShell 2.0.
Top

  Name Description
public property ChildJobs Gets a list of the child jobs included in this job. This property is introduced in Windows PowerShell 2.0.
public property Command Gets the command that is run by this job. This property is introduced in Windows PowerShell 2.0.
public property Debug Gets and sets the buffer where debug information is stored. This property is introduced in Windows PowerShell 2.0.
public property Error Gets and sets the buffer where error information is stored. This property is introduced in Windows PowerShell 2.0.
public property Finished Gets the wait handle that is signaled when job is finished. This property is introduced in Windows PowerShell 2.0.
public property HasMoreData Gets a Boolean value that indicates whether more data is available. This property is introduced in Windows PowerShell 2.0.
public property Id Gets the identifier of the job. This property is introduced in Windows PowerShell 2.0.
public property InstanceId 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.
public property JobStateInfo Gets the status of the job. This property is introduced in Windows PowerShell 2.0.
public property Location Gets the location of where the job is running. This property is introduced in Windows PowerShell 2.0.
public property Name Gets and sets the name that can be used to identify the job. This property is introduced in Windows PowerShell 2.0.
public property Output Gets and sets the output buffer for the job. This property is introduced in Windows PowerShell 2.0.
public property Progress Gets and sets the progress buffer for the job. This property is introduced in Windows PowerShell 2.0.
public property PSBeginTime Gets or sets when to begin the job.
public property PSEndTime Gets or sets when to end the job.
public property PSJobTypeName Gets or sets the job type name.
public property StatusMessage Gets the status message when the job is successful. This property is introduced in Windows PowerShell 2.0.
public property Verbose Gets and sets the verbose buffer for the job. This property is introduced in Windows PowerShell 2.0.
public property Warning Gets and sets the warning buffer for the job. This property is introduced in Windows PowerShell 2.0.
Top

(see also Protected Methods)
 NameDescription
public methodDisposeOverloaded. Releases the resources that are used by the Job object. These methods implement the Dispose pattern used to release managed and unmanaged resources. This method is introduced in Windows PowerShell 2.0.
public methodEquals  (Inherited from Object)
public methodGetHashCode  (Inherited from Object)
public methodGetType  (Inherited from Object)
public methodLoadJobStreamsLoads the required job streams.
public methodStopJobStops the job in all runspaces. This method is introduced in Windows PowerShell 2.0.
public methodToString  (Inherited from Object)
public methodUnloadJobStreamsUnloads the required job streams.
Top

  Name Description
protected method AutoGenerateJobName 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.
protected method Dispose Overloaded. Releases the resources that are used by the Job object. These methods implement the Dispose pattern used to release managed and unmanaged resources. This method is introduced in Windows PowerShell 2.0.
protected method DoLoadJobStreams Specifies the loading of the streams for a particular job.
protected method DoUnloadJobStreams Unloads job stream information, which enables jobs to clear stream information from memory.
protected method Finalize  (Inherited from Object)
protected method MemberwiseClone  (Inherited from Object)
protected method SetJobState 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.
Top

  Name Description
public event StateChanged 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.
Top


Show:
© 2015 Microsoft