System.Management.Automation.Runspaces Namespace
Updated: April 27, 2016
Applies To: Windows PowerShell
The System.Management.Automation.Runspaces namespace contains the classes, enumerations, and interfaces used to create an individual runspace or a pool of runspaces. In Windows PowerShell 1.0, a single runspace is the operating environment in which one or more pipelines invoke cmdlets. In Windows PowerShell 2.0, a runspace or a pool of runspaces is the operating environment where the command pipeline of the PowerShell object is invoked.
| Class | Description | |
|---|---|---|
![]() | AliasPropertyData | Represents an alias property definition. This class cannot be inherited. Introduced in Windows PowerShell 3.0. |
![]() | AssemblyConfigurationEntry | Represents an assembly for a runspace configuration. |
![]() | CmdletConfigurationEntry | Represents a cmdlet for a runspace configuration. |
![]() | CodeMethodData | Represents a code method definition. This class cannot be inherited. Introduced in Windows PowerShell 3.0. |
![]() | CodePropertyData | Represents a code property definition. This class cannot be inherited. Introduced in Windows PowerShell 3.0. |
![]() | Command | Defines a command that contains a single cmdlet or script. The Command object is used by the PowerShell and Pipeline objects to define a single command. |
![]() | CommandCollection | Represents a collection of Command objects. This class cannot be inherited. |
![]() | CommandParameter | Represents a parameter of a Command object. |
![]() | CommandParameterCollection | Represents a collection of command parameters. This class cannot be inherited. |
![]() | ConstrainedSessionStateEntry | Serves as a base class for those session state entries that can be specified as public or private entries when added to an InitialSessionState object. This includes entries for commands, providers, and variables. This class is introduced in Windows PowerShell 2.0. |
![]() | ContainerConnectionInfo | The class that contains connection information for a remote session between a local container host and container. For Windows Server container, the transport is based on named pipe for now. For Hyper-V container, the transport is based on Hyper-V socket. |
![]() | FormatConfigurationEntry | Represents a format data file for a runspace configuration. This class cannot be inherited. |
![]() | FormatTable | A class that keeps the information from format.ps1xml files in a cache table |
![]() | FormatTableLoadException | This exception is used by Formattable constructor to indicate errors occured during construction time. |
![]() | InitialSessionState | Represents a session state configuration that is used when a runspace is opened. The elements specified here, such as different types of commands, providers, and variables, are accessible each time a runspace that uses this configuration is opened. This class is introduced in Windows PowerShell 2.0. |
![]() | InitialSessionStateEntry | Serves as a base class for all session state entry classes. Session state entries are added to an InitialSessionState object through their appropriate properties. This class is introduced in Windows PowerShell 2.0. |
![]() | InitialSessionStateEntryCollection<'T> | Provides a collection of session state entries, such as commands, types, formats, and variables, for an InitialSessionState object. This class cannot be inherited. This class is introduced in Windows PowerShell 2.0. |
![]() | InvalidPipelineStateException | Exception thrown when the pipeline is in a state that is not valid for the requested action. |
![]() | InvalidRunspacePoolStateException | Exception thrown when an operation is requested and the state of the runspace pool is different from the expected state of runspace pool. This class is introduced in Windows PowerShell 2.0. |
![]() | InvalidRunspaceStateException | Exception thrown when the runspace is in a state that is not valid for the requested action. |
![]() | MemberSetData | MemberSetData represents a MemberSet definition |
![]() | NamedPipeConnectionInfo | Class used to create an Out-Of-Process Runspace/RunspacePool between two local processes using a named pipe for IPC. This class does not have a dependency on WSMan and is used to implement the PowerShell attach-to-process feature. |
![]() | NotePropertyData | Represents a note property definition. This class cannot be inherited. Introduced in Windows PowerShell 3.0. |
![]() | Pipeline | Represents the base functionality of a pipeline that can be used to invoke commands. |
![]() | PipelineReader<'T> | Provides asynchronous access to the stream of objects emitted by the Pipeline object. |
![]() | PipelineStateEventArgs | Provides data for the StateChanged event. This class cannot be inherited. |
![]() | PipelineStateInfo | Provides information about the state of the pipeline. This class cannot be inherited. |
![]() | PipelineWriter | Provides an asynchronous stream of objects as input to a Pipeline object. |
![]() | PowerShellProcessInstance | Represents an instance of a Windows PowerShell process. This class cannot be inherited. Introduced in Windows PowerShell 3.0. |
![]() | PropertySetData | Represents a property set definition. This class cannot be inherited. Introduced in Windows PowerShell 3.0. |
![]() | ProviderConfigurationEntry | Represents a provider for a runspace configuration. This class cannot be inherited. |
![]() | PSConsoleLoadException | Exception thrown when the console cannot be loaded when the runspace is created. |
![]() | PSSession | Provides information about a Windows PowerShell session on a local or remote computer. This object is returned by the New-PSSession and Get-PSSession cmdlets, and is used by the Enter-PsSession and Exit-PsSession cmdlets to specify a session. |
![]() | PSSnapInException | Exception thrown when a Windows PowerShell snap-in cannot be loaded into the current runspace. |
![]() | RemotingDebugRecord | Represents a debug record that contains origin information. Introduced in Windows PowerShell 3.0. |
![]() | RemotingErrorRecord | Represents an error record that is used by remote runspaces to wrap local error records. This class is introduced in Windows PowerShell 2.0. |
![]() | RemotingInformationRecord | Information record containing origin information |
![]() | RemotingProgressRecord | Represents a progress record that contains origin information. Introduced in Windows PowerShell 3.0. |
![]() | RemotingVerboseRecord | Represents a verbose record that contains origin information. Introduced in Windows PowerShell 3.0. |
![]() | RemotingWarningRecord | Represents a warning record that contains origin information. Introduced in Windows PowerShell 3.0. |
![]() | Runspace | 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. |
![]() | RunspaceAvailabilityEventArgs | Provides data for the AvailabilityChanged event. This class is introduced in Windows PowerShell 2.0. |
![]() | RunspaceConfiguration | Defines the configurable information for a single runspace. Runspace configuration information defines the behavior of the Windows PowerShell shell at run time. |
![]() | RunspaceConfigurationAttributeException | The exception that is thrown when the type name specified by the RunspaceConfigurationTypeAttribute attribute does not exist in the assembly or the type is not derived from the RunspaceConfiguration class. |
![]() | RunspaceConfigurationEntry | Serves as the base class for the runspace configuration entry classes that are derived internally by Windows PowerShell (for more information, see Inheritance Hierarchy). Developers should not derive from this class. |
![]() | RunspaceConfigurationEntryCollection<'T> | Represents a collection of runspace configuration entries. This class cannot be inherited. |
![]() | RunspaceConfigurationTypeAttribute | Identifies an assembly, cmdlet, Windows PowerShell provider, or script as an element of a runspace configuration. This class cannot be inherited. |
![]() | RunspaceConfigurationTypeException | The exception that is thrown when the .NET Framework type name does not exist in the assembly or was not specified by the RunspaceConfigurationTypeAttribute attribute, or the type is not derived from the RunspaceConfiguration class. |
![]() | RunspaceConnectionInfo | Provides information about the connection used for opening the runspace on a computer, such as the name of the computer where the runspace is opened, the port used to make the connection, and the uniform resource identifier (URI) of the connection. This class is introduced in Windows PowerShell 2.0. |
![]() | RunspaceFactory | Provides a means to create a single runspace or a pool of runspaces. |
![]() | RunspaceOpenModuleLoadException | The exception that is thrown when an error occurs when loading a module while the runspace is being opened. This exception contains a list of all of the module errors that occurred. |
![]() | RunspacePool | Maintains a group of runspaces that have the same characteristics and can be opened and closed on an as-needed basis. Runspace pools can be used to execute multiple commands concurrently, with each command invoked in a different runspace. This class is introduced in Windows PowerShell 2.0. |
![]() | RunspacePoolStateChangedEventArgs | Provides data for the RunspacePool.StateChanged event. This class is introduced in Windows PowerShell 2.0. |
![]() | RunspaceStateEventArgs | Provides data for the StateChanged event. |
![]() | RunspaceStateInfo | Provides information about the current state of the runspace. |
![]() | ScriptConfigurationEntry | Represents a script for a runspace configuration. This class cannot be inherited. |
![]() | ScriptMethodData | Represents a script method definition. This class cannot be inherited. Introduced in Windows PowerShell 3.0. |
![]() | ScriptPropertyData | Represents a script property definition. This class cannot be inherited. Introduced in Windows PowerShell 3.0. |
![]() | SessionStateAliasEntry | Defines an alias for an initial session state configuration. The initial session state of a runspace defines the elements, such as aliases, that are available when the runspace is opened. This class is introduced in Windows PowerShell 2.0. |
![]() | SessionStateApplicationEntry | Defines an application for an initial session state configuration. The initial session state of a runspace defines the elements, such as applications, that are available when the runspace is opened. This class is introduced in Windows PowerShell 2.0. |
![]() | SessionStateAssemblyEntry | Defines an assembly for an initial session state configuration. The initial session state of a runspace defines the elements, such as assemblies, that are available when the runspace is opened. This class is introduced in Windows PowerShell 2.0. |
![]() | SessionStateCmdletEntry | Defines a cmdlet for an initial session state configuration. The initial session state of a runspace defines the elements, such as cmdlets, that are available when the runspace is opened. This class is introduced in Windows PowerShell 2.0. |
![]() | SessionStateCommandEntry | Serves as a base class for session state entries that specify cmdlets, scripts, functions, aliases, and applications. This class is introduced in Windows PowerShell 2.0. |
![]() | SessionStateFormatEntry | Defines a display format for a .NET Framework type of an initial session state configuration. This class is used to specify formatting information that is loaded when a runspace that uses this session state configuration is opened. This class is introduced in Windows PowerShell 2.0. |
![]() | SessionStateFunctionEntry | Defines a function for an initial session state configuration. The initial session state of a runspace defines the elements, such as functions, that are available when the runspace is opened. This class cannot be inherited. This class is introduced in Windows PowerShell 2.0. |
![]() | SessionStateProviderEntry | Defines a provider for an initial session state configuration. The initial session state of a runspace defines the elements, such as providers, that are available when the runspace is opened. This class is introduced in Windows PowerShell 2.0. |
![]() | SessionStateProxy | Provides methods to get and set variables in the session state. |
![]() | SessionStateScriptEntry | Defines a script for an initial session state configuration. The initial session state of a runspace defines the elements, such as scripts, that are available when the runspace is opened. This class is introduced in Windows PowerShell 2.0. |
![]() | SessionStateTypeEntry | Defines the .NET Framework types for the initial session state configuration of a runspace. This entry, which is loaded when the runspace is opened, can reference strong session state type entry data, a types table, or a Types.ps1xml file. This class is introduced in Windows PowerShell 2.0. |
![]() | SessionStateVariableEntry | Defines a variable for an initial session state configuration. The initial session state of a runspace defines the elements, such as variables, that are available when the runspace is opened. This class is introduced in Windows PowerShell 2.0. |
![]() | SessionStateWorkflowEntry | Represents a session state entry for a workflow. This class cannot be inherited. Introduced in Windows PowerShell 3.0. |
![]() | TypeConfigurationEntry | Represents a type data file for a runspace configuration. This class cannot be inherited. |
![]() | TypeData | Represents a type definition. This class cannot be inherited. Introduced in Windows PowerShell 3.0. |
![]() | TypeMemberData | Represents the base functionality for type members. Introduced in Windows PowerShell 3.0. |
![]() | TypeTable | Provides .NET Framework type information that is supplied by type.ps1xml files. This class cannot be inherited. This class is introduced in Windows PowerShell 2.0. |
![]() | TypeTableLoadException | Exception thrown if errors occur when attempting to construct a TypeTable object. This class is introduced in Windows PowerShell 2.0. |
![]() | VMConnectionInfo | The class that contains connection information for a remote session between a local host and VM. The local host can be a VM in nested scenario. |
![]() | WSManConnectionInfo | Provides the connection information that is needed to connect to a remote runspace. Windows PowerShell uses a Windows Remote Management (WinRM) connection to connect to the computer where the remote runspace is opened. This class is introduced in Windows PowerShell 2.0. |
| Enumeration | Description | |
|---|---|---|
![]() | AuthenticationMechanism | Defines the types of authentication used to create a PSSession on a computer. This class is introduced in Windows PowerShell 2.0. |
![]() | OutputBufferingMode | Describes the behavior of a Web Services for Management protocol (WSMan) server if the output cache for the running command pipeline is full. Introduced in Windows PowerShell 3.0. |
![]() | PipelineResultTypes | Defines the types of output streams for the pipeline. |
![]() | PipelineState | Defines the states of the pipeline. |
![]() | PSSessionConfigurationAccessMode | Describes the type of access mode that should be used when creating a session configuration. Introduced in Windows PowerShell 3.0. |
![]() | PSSessionType | Describes the type of session configuration that should be used for creating connection information. Introduced in Windows PowerShell 3.0. |
![]() | PSThreadOptions | Defines how threads are created and used when a command is executed within a runspace. This enumeration is introduced in Windows PowerShell 2.0. |
![]() | RunspaceAvailability | Defines the availability of a runspace, such as is it available or busy. This enumeration is introduced in Windows PowerShell 2.0. |
![]() | RunspaceCapability | Describes the capabilities of a runspace. Introduced in Windows PowerShell 3.0. |
![]() | RunspacePoolAvailability | Specifies the availability of a runspace pool. Introduced in Windows PowerShell 3.0. |
![]() | RunspacePoolCapability | Describes the capabilities of a runspace pool. Introduced in Windows PowerShell 3.0. |
![]() | RunspacePoolState | Defines the states of a runspace pool. The runspace pool is used to execute commands concurrently using a set of similarly configured runspaces. This enumeration is introduced in Windows PowerShell 2.0. |
![]() | RunspaceState | Defines the various states of the runspace. |
![]() | TargetMachineType | Describes the computer target type. |

