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 (RunspaceConnectionInfo)


Updated: April 27, 2016

Applies To: Windows PowerShell

Creates a single runspace that can be opened on a remote computer. The runspace uses the default host and specified connection information.

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

public static Runspace CreateRunspace(
	RunspaceConnectionInfo connectionInfo


Type: System.Management.Automation.Runspaces.RunspaceConnectionInfo

An object that derives from the RunspaceConnectionInfo abstract class. This object defines the information used to connect to a specific computer.

Return Value

Type: System.Management.Automation.Runspaces.Runspace

Returns a Runspace object that represents the runspace that uses the specified connection information.

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.

Return to top

Community Additions