Runspace Members
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Top
Top
Top
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 | |
|---|---|---|
|
DefaultRunspace | Gets and sets the default runspace used to evaluate scripts. |
|
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. |
|
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. |
|
Version | Gets the version of the assembly in which the runspace class is implemented. |
|
RunspaceStateInfo | Gets the current state of the runspace. |
|
RunspaceAvailability | Gets a constant that identifies whether the runspace is available or busy. This property is introduced in Windows PowerShell 2.0. |
|
RunspaceConfiguration | Gets and sets the configuration information that describes the capabilities of the runspace. |
|
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. |
|
InstanceId | Gets the unique identifier for this instance of the runspace. This identifier is typically used when logging individual instances of the runspace. |
|
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. |
|
OriginalConnectionInfo | |
|
JobManager | |
|
SessionStateProxy | Gets access to methods that are used to get and set variables in the session state. |
|
Debugger | Gets the debugger instance for the current runspace. This property is introduced in Windows PowerShell 2.0. |
|
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. |
(see also Protected Methods)
Top
| Name | Description | |
|---|---|---|
![]() | ToString | (Inherited from Object) |
![]() | Equals | (Inherited from Object) |
![]() | GetHashCode | (Inherited from Object) |
![]() | GetType | (Inherited from Object) |
![]() | ClearBaseTransaction | Clears the base transaction that is used by all transactions that are performed on this runspace. This method is introduced in Windows PowerShell 2.0. |
![]() | Close | Closes the runspace and makes it unavailable for use. |
![]() | CloseAsync | Closes 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. |
![]() | Connect | Synchronously 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. |
![]() | ConnectAsync | Asynchronously 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. |
![]() | CreateDisconnectedPipeline | Creates a Pipeline object in the Disconnected state for the currently disconnected remote running command associated with this runspace. |
![]() | CreateDisconnectedPowerShell | Creates a PowerShell object in the Disconnected state for the currently disconnected remote running command associated with this runspace. |
![]() | CreateNestedPipeline | Creates a pipeline for the runspace while an existing pipeline is executing. |
![]() | CreateNestedPipeline | Creates 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. |
![]() | CreatePipeline | Creates a pipeline for the runspace. |
![]() | CreatePipeline | Creates a pipeline for the runspace. This method also specifies commands (such as cmdlets and scripts) that can be executed by the pipeline. |
![]() | CreatePipeline | Creates 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. |
![]() | Disconnect | Synchronously 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. |
![]() | DisconnectAsync | Asynchronously 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. |
![]() | Dispose | Releases the resources used by the Runspace object. |
![]() | GetApplicationPrivateData | Retrieves private application data from the server that can be used by the runspace. This method is introduced in Windows PowerShell 2.0. |
![]() | GetCapabilities | |
![]() ![]() | GetRunspaces | |
![]() ![]() | GetRunspaces | |
![]() ![]() | GetRunspaces | |
![]() | Open | Opens the runspace synchronously, creating a Windows PowerShell execution environment. |
![]() | OpenAsync | Opens the runspace asynchronously, creating a Windows PowerShell execution environment. This method returns control immediately, and then, in a separate thread, opens the runspace. |
![]() | ResetRunspaceState | |
![]() | SetBaseTransaction | Sets the base transaction that is used by all transactions performed on this runspace. This method is introduced in Windows PowerShell 2.0. |
![]() | SetBaseTransaction | Sets 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. |
| Name | Description | |
|---|---|---|
|
Finalize | (Inherited from Object) |
|
MemberwiseClone | (Inherited from Object) |
|
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. |
|
OnAvailabilityChanged | Raises the AvailabilityChanged event when the state of the currently invoked pipeline changes. This method is introduced in Windows PowerShell 2.0. |
|
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. |
| Name | Description | |
|---|---|---|
|
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. |
|
StateChanged | Event that is raised when the state of the runspace changes. |
Send comments about this topic to Microsoft.
