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, PSHost, TypeTable)


Updated: April 27, 2016

Applies To: Windows PowerShell

Creates a single runspace that can be opened on a remote computer. The runspace uses a custom host, connection information, and type table (serialization) information. This method is introduced in Windows PowerShell 2.0.

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

public static Runspace CreateRunspace(
	RunspaceConnectionInfo connectionInfo,
	PSHost host,
	TypeTable typeTable


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.

Type: System.Management.Automation.Host.PSHost

A PSHost object that represents the host that provides communications between Windows PowerShell and the user.

Type: System.Management.Automation.Runspaces.TypeTable

A TypeTable object that contains information used to serialize and deserialize objects passed between computers.

Return Value

Type: System.Management.Automation.Runspaces.Runspace

Returns a Runspace object that represents the runspace that uses the specified connection information, host, and type table.

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