RunspaceFactory.CreateRunspace RunspaceFactory.CreateRunspace RunspaceFactory.CreateRunspace Method

Definition

Overloads

CreateRunspace(RunspaceConnectionInfo, PSHost, TypeTable, PSPrimitiveDictionary, String) CreateRunspace(RunspaceConnectionInfo, PSHost, TypeTable, PSPrimitiveDictionary, String)
CreateRunspace(RunspaceConnectionInfo, PSHost, TypeTable, PSPrimitiveDictionary) CreateRunspace(RunspaceConnectionInfo, PSHost, TypeTable, PSPrimitiveDictionary)
CreateRunspace(PSHost, RunspaceConnectionInfo) CreateRunspace(PSHost, RunspaceConnectionInfo) CreateRunspace(PSHost, RunspaceConnectionInfo)
CreateRunspace(PSHost, RunspaceConfiguration) CreateRunspace(PSHost, RunspaceConfiguration)

Creates a runspace using specified PSHost and RunspaceConfiguration

CreateRunspace(PSHost, InitialSessionState) CreateRunspace(PSHost, InitialSessionState)

Creates a runspace using specified PSHost and InitialSessionState

CreateRunspace(RunspaceConnectionInfo, PSHost, TypeTable) CreateRunspace(RunspaceConnectionInfo, PSHost, TypeTable)
CreateRunspace(RunspaceConfiguration) CreateRunspace(RunspaceConfiguration)

Creates a runspace using Microsoft.PowerShell.DefaultHost

CreateRunspace(InitialSessionState) CreateRunspace(InitialSessionState)

Creates a runspace using Microsoft.PowerShell.DefaultHost

CreateRunspace(PSHost) CreateRunspace(PSHost) CreateRunspace(PSHost)

Creates a runspace using specified host. This runspace is created using the configuration information from EntryAssembly.

CreateRunspace() CreateRunspace() CreateRunspace()

Creates a runspace using host of type Microsoft.PowerShell.DefaultHost.

CreateRunspace(RunspaceConnectionInfo) CreateRunspace(RunspaceConnectionInfo) CreateRunspace(RunspaceConnectionInfo)

CreateRunspace(RunspaceConnectionInfo, PSHost, TypeTable, PSPrimitiveDictionary, String) CreateRunspace(RunspaceConnectionInfo, PSHost, TypeTable, PSPrimitiveDictionary, String)

public static System.Management.Automation.Runspaces.Runspace CreateRunspace (System.Management.Automation.Runspaces.RunspaceConnectionInfo connectionInfo, System.Management.Automation.Host.PSHost host, System.Management.Automation.Runspaces.TypeTable typeTable, System.Management.Automation.PSPrimitiveDictionary applicationArguments, string name);
static member CreateRunspace : System.Management.Automation.Runspaces.RunspaceConnectionInfo * System.Management.Automation.Host.PSHost * System.Management.Automation.Runspaces.TypeTable * System.Management.Automation.PSPrimitiveDictionary * string -> System.Management.Automation.Runspaces.Runspace
Parameters
typeTable
TypeTable TypeTable TypeTable

The TypeTable to use while deserializing/serializing remote objects. TypeTable has the following information used by serializer:

  1. SerializationMethod
  2. SerializationDepth
  3. SpecificSerializationProperties TypeTable has the following information used by deserializer:
  4. TargetTypeForDeserialization
  5. TypeConverter
applicationArguments
PSPrimitiveDictionary PSPrimitiveDictionary PSPrimitiveDictionary

Application arguments the server can see in ApplicationArguments

name
String String String

Name for remote runspace.

Returns

CreateRunspace(RunspaceConnectionInfo, PSHost, TypeTable, PSPrimitiveDictionary) CreateRunspace(RunspaceConnectionInfo, PSHost, TypeTable, PSPrimitiveDictionary)

public static System.Management.Automation.Runspaces.Runspace CreateRunspace (System.Management.Automation.Runspaces.RunspaceConnectionInfo connectionInfo, System.Management.Automation.Host.PSHost host, System.Management.Automation.Runspaces.TypeTable typeTable, System.Management.Automation.PSPrimitiveDictionary applicationArguments);
static member CreateRunspace : System.Management.Automation.Runspaces.RunspaceConnectionInfo * System.Management.Automation.Host.PSHost * System.Management.Automation.Runspaces.TypeTable * System.Management.Automation.PSPrimitiveDictionary -> System.Management.Automation.Runspaces.Runspace
Parameters
typeTable
TypeTable TypeTable TypeTable

The TypeTable to use while deserializing/serializing remote objects. TypeTable has the following information used by serializer:

  1. SerializationMethod
  2. SerializationDepth
  3. SpecificSerializationProperties TypeTable has the following information used by deserializer:
  4. TargetTypeForDeserialization
  5. TypeConverter
applicationArguments
PSPrimitiveDictionary PSPrimitiveDictionary PSPrimitiveDictionary

Application arguments the server can see in ApplicationArguments

Returns

CreateRunspace(PSHost, RunspaceConnectionInfo) CreateRunspace(PSHost, RunspaceConnectionInfo) CreateRunspace(PSHost, RunspaceConnectionInfo)

public static System.Management.Automation.Runspaces.Runspace CreateRunspace (System.Management.Automation.Host.PSHost host, System.Management.Automation.Runspaces.RunspaceConnectionInfo connectionInfo);
static member CreateRunspace : System.Management.Automation.Host.PSHost * System.Management.Automation.Runspaces.RunspaceConnectionInfo -> System.Management.Automation.Runspaces.Runspace
Public Shared Function CreateRunspace (host As PSHost, connectionInfo As RunspaceConnectionInfo) As Runspace
Parameters
Returns

CreateRunspace(PSHost, RunspaceConfiguration) CreateRunspace(PSHost, RunspaceConfiguration)

Creates a runspace using specified PSHost and RunspaceConfiguration

public static System.Management.Automation.Runspaces.Runspace CreateRunspace (System.Management.Automation.Host.PSHost host, System.Management.Automation.Runspaces.RunspaceConfiguration runspaceConfiguration);
static member CreateRunspace : System.Management.Automation.Host.PSHost * System.Management.Automation.Runspaces.RunspaceConfiguration -> System.Management.Automation.Runspaces.Runspace
Parameters
host
PSHost PSHost PSHost

Host implementation for runspace.

runspaceConfiguration
RunspaceConfiguration RunspaceConfiguration RunspaceConfiguration

RunspaceConfiguration information for the runspace.

Returns

A runspace object

Exceptions

CreateRunspace(PSHost, InitialSessionState) CreateRunspace(PSHost, InitialSessionState)

Creates a runspace using specified PSHost and InitialSessionState

public static System.Management.Automation.Runspaces.Runspace CreateRunspace (System.Management.Automation.Host.PSHost host, System.Management.Automation.Runspaces.InitialSessionState initialSessionState);
static member CreateRunspace : System.Management.Automation.Host.PSHost * System.Management.Automation.Runspaces.InitialSessionState -> System.Management.Automation.Runspaces.Runspace
Parameters
host
PSHost PSHost PSHost

Host implementation for runspace.

initialSessionState
InitialSessionState InitialSessionState InitialSessionState

InitialSessionState information for the runspace.

Returns

A runspace object

Exceptions

CreateRunspace(RunspaceConnectionInfo, PSHost, TypeTable) CreateRunspace(RunspaceConnectionInfo, PSHost, TypeTable)

public static System.Management.Automation.Runspaces.Runspace CreateRunspace (System.Management.Automation.Runspaces.RunspaceConnectionInfo connectionInfo, System.Management.Automation.Host.PSHost host, System.Management.Automation.Runspaces.TypeTable typeTable);
static member CreateRunspace : System.Management.Automation.Runspaces.RunspaceConnectionInfo * System.Management.Automation.Host.PSHost * System.Management.Automation.Runspaces.TypeTable -> System.Management.Automation.Runspaces.Runspace
Parameters
typeTable
TypeTable TypeTable TypeTable

The TypeTable to use while deserializing/serializing remote objects. TypeTable has the following information used by serializer:

  1. SerializationMethod
  2. SerializationDepth
  3. SpecificSerializationProperties TypeTable has the following information used by deserializer:
  4. TargetTypeForDeserialization
  5. TypeConverter
Returns

CreateRunspace(RunspaceConfiguration) CreateRunspace(RunspaceConfiguration)

Creates a runspace using Microsoft.PowerShell.DefaultHost

public static System.Management.Automation.Runspaces.Runspace CreateRunspace (System.Management.Automation.Runspaces.RunspaceConfiguration runspaceConfiguration);
static member CreateRunspace : System.Management.Automation.Runspaces.RunspaceConfiguration -> System.Management.Automation.Runspaces.Runspace
Parameters
runspaceConfiguration
RunspaceConfiguration RunspaceConfiguration RunspaceConfiguration

RunspaceConfiguration information for the runspace.

Returns

A runspace object

Exceptions

CreateRunspace(InitialSessionState) CreateRunspace(InitialSessionState)

Creates a runspace using Microsoft.PowerShell.DefaultHost

public static System.Management.Automation.Runspaces.Runspace CreateRunspace (System.Management.Automation.Runspaces.InitialSessionState initialSessionState);
static member CreateRunspace : System.Management.Automation.Runspaces.InitialSessionState -> System.Management.Automation.Runspaces.Runspace
Parameters
initialSessionState
InitialSessionState InitialSessionState InitialSessionState

InitialSessionState information for the runspace.

Returns

A runspace object

Exceptions

CreateRunspace(PSHost) CreateRunspace(PSHost) CreateRunspace(PSHost)

Creates a runspace using specified host. This runspace is created using the configuration information from EntryAssembly.

public static System.Management.Automation.Runspaces.Runspace CreateRunspace (System.Management.Automation.Host.PSHost host);
static member CreateRunspace : System.Management.Automation.Host.PSHost -> System.Management.Automation.Runspaces.Runspace
Public Shared Function CreateRunspace (host As PSHost) As Runspace
Parameters
host
PSHost PSHost PSHost

The explicit PSHost implementation.

Returns

A runspace object

Exceptions

CreateRunspace() CreateRunspace() CreateRunspace()

Creates a runspace using host of type Microsoft.PowerShell.DefaultHost.

public static System.Management.Automation.Runspaces.Runspace CreateRunspace ();
static member CreateRunspace : unit -> System.Management.Automation.Runspaces.Runspace
Public Shared Function CreateRunspace () As Runspace
Returns

A runspace object.

CreateRunspace(RunspaceConnectionInfo) CreateRunspace(RunspaceConnectionInfo) CreateRunspace(RunspaceConnectionInfo)

public static System.Management.Automation.Runspaces.Runspace CreateRunspace (System.Management.Automation.Runspaces.RunspaceConnectionInfo connectionInfo);
static member CreateRunspace : System.Management.Automation.Runspaces.RunspaceConnectionInfo -> System.Management.Automation.Runspaces.Runspace
Public Shared Function CreateRunspace (connectionInfo As RunspaceConnectionInfo) As Runspace
Parameters
Returns

Applies to