Runspace Runspace Runspace Runspace Class
Definition
Public interface to Msh Runtime. Provides APIs for creating pipelines, access session state etc.
public ref class Runspace abstract : IDisposable
public abstract class Runspace : IDisposable
type Runspace = class
interface IDisposable
Public MustInherit Class Runspace
Implements IDisposable
- Inheritance
- Implements
Properties
ApartmentState ApartmentState ApartmentState ApartmentState |
ApartmentState of the thread used to execute commands within this Runspace |
CanUseDefaultRunspace CanUseDefaultRunspace CanUseDefaultRunspace CanUseDefaultRunspace |
Returns true if Runspace.DefaultRunspace can be used to create an instance of the PowerShell class with 'UseCurrentRunspace = true'. |
ConnectionInfo ConnectionInfo ConnectionInfo ConnectionInfo |
Connection information for remote Runspaces, null for local Runspaces |
Debugger Debugger Debugger Debugger |
Gets the debugger |
DefaultRunspace DefaultRunspace DefaultRunspace DefaultRunspace |
Gets and sets the default Runspace used to evaluate scripts |
DisconnectedOn DisconnectedOn DisconnectedOn DisconnectedOn |
DisconnectedOn property applies to remote runspaces that have been disconnected. |
Events Events Events Events |
Gets the event manager |
ExpiresOn ExpiresOn ExpiresOn ExpiresOn |
ExpiresOn property applies to remote runspaces that have been disconnected. |
Id Id Id Id |
Gets the Runspace Id. |
InitialSessionState InitialSessionState InitialSessionState InitialSessionState |
InitialSessionState information for this runspace. |
InstanceId InstanceId InstanceId InstanceId |
Get unqiue id for this instance of runspace. It is primarily used for logging purposes |
JobManager JobManager JobManager JobManager |
Manager for JobSourceAdapters registered in this runspace. |
Name Name Name Name |
Gets and sets a friendly name for the Runspace. |
OriginalConnectionInfo OriginalConnectionInfo OriginalConnectionInfo OriginalConnectionInfo |
ConnectionInfo originally supplied by the user |
RunspaceAvailability RunspaceAvailability RunspaceAvailability RunspaceAvailability |
Gets the current availability of the Runspace |
RunspaceConfiguration RunspaceConfiguration RunspaceConfiguration RunspaceConfiguration |
RunspaceConfiguration information for this runspace. |
RunspaceIsRemote RunspaceIsRemote RunspaceIsRemote RunspaceIsRemote |
Return whether the Runspace is Remote We can determine this by whether the runspace is an implementation of LocalRunspace or infer it from whether the ConnectionInfo property is null If it happens to be an instance of a LocalRunspace, but has a non-null ConnectionInfo we declare it to be remote |
RunspaceStateInfo RunspaceStateInfo RunspaceStateInfo RunspaceStateInfo |
Retrieve information about current state of the runspace |
SessionStateProxy SessionStateProxy SessionStateProxy SessionStateProxy |
Gets session state proxy |
ThreadOptions ThreadOptions ThreadOptions ThreadOptions |
This property determines whether a new thread is create for each invocation |
Version Version Version Version |
Return version of this runspace |
Methods
Events
AvailabilityChanged AvailabilityChanged AvailabilityChanged AvailabilityChanged |
Event raised when the availability of the Runspace changes. |
StateChanged StateChanged StateChanged StateChanged |
Event raised when RunspaceState changes. |