1 out of 1 rated this helpful - Rate this topic

Runspace Members

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Represents the runspace that is the operating environment for command pipelines. This class provides methods for opening the runspace, creating single and nested pipelines for the runspace, and closing the runspace.

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

  Name Description
public property static DefaultRunspace Gets and sets the default runspace used to evaluate scripts.
public property ApartmentState Gets the apartment state of the thread used to run commands in the runspace. This property must be set before the runspace is opened.This property is introduced in Windows PowerShell 2.0.
public property ThreadOptions Gets and sets information about how threads are created and used when a command is run within the runspace. This property must be set before the runspace is opened. This property is introduced in Windows PowerShell 2.0.
public property Version Gets the version of the assembly in which the runspace class is implemented.
public property RunspaceStateInfo Gets the current state of the runspace.
public property RunspaceAvailability Gets a constant that identifies whether the runspace is available or busy. This property is introduced in Windows PowerShell 2.0.
public property RunspaceConfiguration Gets and sets the configuration information that describes the capabilities of the runspace.
public property InitialSessionState Gets configuration information about the session state used when the runspace is opened. The configuration information includes the different types of commands, providers, and variables that are accessible to the runspace when the runspace is opened. This property is introduced in Windows PowerShell 2.0.
public property InstanceId Gets the unique identifier for this instance of the runspace. This identifier is typically used when logging individual instances of the runspace.
public property ConnectionInfo Gets information about the connection used to open a runspace on a computer. Typically this is a connection to a remote computer; however it can also be a connection to the local computer. This property is introduced in Windows PowerShell 2.0.
public property OriginalConnectionInfo  
public property JobManager  
public property SessionStateProxy Gets access to methods that are used to get and set variables in the session state.
public property Debugger Gets the debugger instance for the current runspace. This property is introduced in Windows PowerShell 2.0.
public property Events Gets the event manager who handles subscribing to and receiving events that are raised by Windows PowerShell. This property is introduced in Windows PowerShell 2.0.
Top
(see also Protected Methods)
 NameDescription
public methodToString  (Inherited from Object)
public methodEquals  (Inherited from Object)
public methodGetHashCode  (Inherited from Object)
public methodGetType  (Inherited from Object)
public methodClearBaseTransactionClears the base transaction that is used by all transactions that are performed on this runspace. This method is introduced in Windows PowerShell 2.0.
public methodCloseCloses the runspace and makes it unavailable for use.
public methodCloseAsyncCloses the runspace asynchronously, and makes it unavailable for use. This method returns control immediately, and then, in a separate thread, closes the runspace and stops all its associated pipelines.
public methodConnectSynchronously connects the remote runspace to the remote server and sets the runspace state to “opened”. If the object is a local runspace, a “not supported” execption is thrown.
public methodConnectAsyncAsynchronously connects the remote runspace to the remote server and sets the runspace state to “opened”. If the object is a local runspace, a “not supported” execption is thrown.
public methodCreateDisconnectedPipelineCreates a Pipeline object in the Disconnected state for the currently disconnected remote running command associated with this runspace.
public methodCreateDisconnectedPowerShellCreates a PowerShell object in the Disconnected state for the currently disconnected remote running command associated with this runspace.
public methodCreateNestedPipelineCreates a pipeline for the runspace while an existing pipeline is executing.
public methodCreateNestedPipelineCreates a pipeline for the runspace while an existing pipeline is executing. This method also specifies the commands (such as cmdlets and scripts) that can be executed by the pipeline and specifies a Boolean value that indicates that pipeline execution is added to the history of the runspace.
public methodCreatePipelineCreates a pipeline for the runspace.
public methodCreatePipelineCreates a pipeline for the runspace. This method also specifies commands (such as cmdlets and scripts) that can be executed by the pipeline.
public methodCreatePipelineCreates a pipeline for the runspace. This method also specifies the commands (such as cmdlets and scripts) that can be executed by the pipeline and a Boolean value that indicates that pipeline execution is added to the history of the runspace.
public methodDisconnectSynchronously disconnects the remote runspace from the remote server and sets the runspace state to “disconnected”. If the object is a local runspace, a “not supported” execption is thrown.
public methodDisconnectAsyncAsynchronously disconnects the remote runspace from the remote server and sets the runspace state to “disconnected”. If the object is a local runspace, a “not supported” execption is thrown.
public methodDisposeReleases the resources used by the Runspace object.
public methodGetApplicationPrivateDataRetrieves private application data from the server that can be used by the runspace. This method is introduced in Windows PowerShell 2.0.
public methodGetCapabilities 
public methodstaticGetRunspaces 
public methodstaticGetRunspaces 
public methodstaticGetRunspaces 
public methodOpenOpens the runspace synchronously, creating a Windows PowerShell execution environment.
public methodOpenAsyncOpens the runspace asynchronously, creating a Windows PowerShell execution environment. This method returns control immediately, and then, in a separate thread, opens the runspace.
public methodResetRunspaceState 
public methodSetBaseTransactionSets the base transaction that is used by all transactions performed on this runspace. This method is introduced in Windows PowerShell 2.0.
public methodSetBaseTransactionSets the base transaction that is used by all transactions performed on this runspace and specifies the error condition that will cause the transaction to be automatically rolled back. This method is introduced in Windows PowerShell 2.0.
Top
  Name Description
protected method Finalize  (Inherited from Object)
protected method MemberwiseClone  (Inherited from Object)
protected method Dispose Disposes this instance of the runspace, and defines a Boolean value that specifies whether the call is made by the cmdlet or by the runtime.
protected method OnAvailabilityChanged Raises the AvailabilityChanged event when the state of the currently invoked pipeline changes. This method is introduced in Windows PowerShell 2.0.
protected method UpdateRunspaceAvailability Raises the AvailabilityChanged event when the state of the currently invoked pipeline changes to the specified state. This method is introduced in Windows PowerShell 2.0.
Top
  Name Description
public event AvailabilityChanged Event that is raised when the availability of the runspace changes, such as when the runspace becomes available and when it is busy. This event is introduced in Windows PowerShell 2.0.
public event StateChanged Event that is raised when the state of the runspace changes.
Top

Send comments about this topic to Microsoft.
Did you find this helpful?
(1500 characters remaining)