RunspaceFactory.CreateRunspace
Method
Definition
Overloads
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);
- connectionInfo
- RunspaceConnectionInfo
- host
- PSHost
- typeTable
- TypeTable
- applicationArguments
- PSPrimitiveDictionary
- name
- String
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);
- connectionInfo
- RunspaceConnectionInfo
- host
- PSHost
- typeTable
- TypeTable
The TypeTable to use while deserializing/serializing remote objects. TypeTable has the following information used by serializer:
- SerializationMethod
- SerailizationDepth
- SpecificSerializationProperties TypeTable has the following inforamtion used by deserializer:
- TargetTypeForDeserializaiton
- TypeConverter
- applicationArguments
- PSPrimitiveDictionary
Application arguments the server can see in ApplicationArguments
CreateRunspace(PSHost, RunspaceConnectionInfo)
public static System.Management.Automation.Runspaces.Runspace CreateRunspace (System.Management.Automation.Host.PSHost host, System.Management.Automation.Runspaces.RunspaceConnectionInfo connectionInfo);
- host
- PSHost
- connectionInfo
- RunspaceConnectionInfo
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);
- host
- PSHost
Host implementation for runspace.
- runspaceConfiguration
- RunspaceConfiguration
RunspaceConfiguration information for the runspace.
A runspace object
Thrown when runspaceConfiguration is null
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);
- host
- PSHost
Host implementation for runspace.
- initialSessionState
- InitialSessionState
InitialSessionState information for the runspace.
A runspace object
Thrown when initialSessionState is null
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);
- connectionInfo
- RunspaceConnectionInfo
- host
- PSHost
- typeTable
- TypeTable
The TypeTable to use while deserializing/serializing remote objects. TypeTable has the following information used by serializer:
- SerializationMethod
- SerailizationDepth
- SpecificSerializationProperties TypeTable has the following inforamtion used by deserializer:
- TargetTypeForDeserializaiton
- TypeConverter
CreateRunspace(RunspaceConfiguration)
Creates a runspace using Microsoft.PowerShell.DefaultHost
public static System.Management.Automation.Runspaces.Runspace CreateRunspace (System.Management.Automation.Runspaces.RunspaceConfiguration runspaceConfiguration);
- runspaceConfiguration
- RunspaceConfiguration
RunspaceConfiguration information for the runspace.
A runspace object
Thrown when runspaceConfiguration is null
CreateRunspace(InitialSessionState)
Creates a runspace using Microsoft.PowerShell.DefaultHost
public static System.Management.Automation.Runspaces.Runspace CreateRunspace (System.Management.Automation.Runspaces.InitialSessionState initialSessionState);
- initialSessionState
- InitialSessionState
InitialSessionState information for the runspace.
A runspace object
Thrown when initialSessionState is null
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);
- host
- PSHost
The explicit PSHost implementation.
A runspace object
Thrown when host is null.
CreateRunspace()
Creates a runspace using host of type Microsoft.PowerShell.DefaultHost. This runspace is created using the RunspaceConfiguration information from EntryAssembly.
public static System.Management.Automation.Runspaces.Runspace CreateRunspace ();
A runspace object.
CreateRunspace(RunspaceConnectionInfo)
public static System.Management.Automation.Runspaces.Runspace CreateRunspace (System.Management.Automation.Runspaces.RunspaceConnectionInfo connectionInfo);
- connectionInfo
- RunspaceConnectionInfo