Share via


PSJob Members

Represents a background job that runs a pipeline that can contain a command or expression. The job is run asynchronously without interacting with the console.

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

Protected Constructors

  Name Description
PSJob Overloaded.  

Top

Public Fields

  Name Description
public field StateChanged Event fired when the status of the PSJob changes, such as when the job has completed in all runspaces or failed in any one namespace.

Top

Public Properties

  Name Description
public property ChildJobs Gets the PSJob objects for each runspace where the job is run, plus the object that defines the job.
public property Command Gets the pipeline to be executed by the PSJob.
public property Debug Gets and sets the debug output of the PSJob.
public property Error Gets and sets the error output of the PSJob.
public property Finished Gets the wait handle that is set when the job is completed on all runspaces, or stopped or failed on one or more runspaces.
public property HasMoreData Gets a Boolean value that indicates whether the PSJob result has more data.
public property InstanceId Gets the instance identifier of the PSJob that is unique throughout all runspaces.
public property JobStateInfo Gets information about the status of the PSJob.
public property Location  
public property Name Gets and sets the name of the PSJob.
public property Output Gets and sets the output of the PSJob.
public property Progress Gets and sets the progress data of the PSJob.
public property SessionId Gets the identifier of the PSJob that is unique within a session.
public property StatusMessage Gets the success message for the PSJob.
public property Verbose Gets and sets the verbose output for the PSJob.
public property Warning Gets and sets the warning output for the PSJob.

Top

Public Methods

(see also Protected Methods)

  Name Description
public method Dispose Overloaded. Disposes the current PSJob object, which frees all resource used by the object. The variants of this method can dispose the method with or without a Boolean value that indicates that the object is in the process of being disposed.
public method Equals  Overloaded. (Inherited from Object)
public method GetHashCode  (Inherited from Object)
public method GetType  (Inherited from Object)
public methodstatic ReferenceEquals  (Inherited from Object)
public method StopJob Stops the PSJob on all runspaces.
public method ToString  (Inherited from Object)

Top

Protected Methods

  Name Description
protected method AutoGenerateJobName  
protected method Dispose Overloaded.  
protected method Finalize  (Inherited from Object)
protected method MemberwiseClone  (Inherited from Object)
protected method SetJobState Sets the status of the PSJob, such as running, completed, or failed.

Top

See Also

Reference

PSJob Class
System.Management.Automation Namespace

Send comments about this topic to Microsoft.