Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

RunspaceFactory.CreateRunspace Method (RunspaceConfiguration)

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Creates a single runspace that uses the default host and specified runspace configuration information.

Namespace:   System.Management.Automation.Runspaces
Assembly:  System.Management.Automation (in System.Management.Automation.dll)

public static Runspace CreateRunspace(
	RunspaceConfiguration runspaceConfiguration
)

Parameters

runspaceConfiguration
Type: System.Management.Automation.Runspaces.RunspaceConfiguration

A RunspaceConfiguration object that represents the runspace configuration.

Return Value

Type: System.Management.Automation.Runspaces.Runspace

Returns a Runspace object that represents the runspace. When the runspace is opened the specified runspace configuration is used.

A runspace is the operating environment used when invoking the commands of a pipeline. After the runspace is created, it must be opened by using one of the following methods before it can be used:

  • To open the runspace synchronously, call the Open method.

  • To open the runspace asynchronously, call the OpenAsync method.

Runspaces created with this method use the default host provided by Windows PowerShell. When using the default host there is no way to interact or communicate directly with the user through prompting.

Return to top

Community Additions

Show: