RunspaceFactory.CreateRunspacePool RunspaceFactory.CreateRunspacePool RunspaceFactory.CreateRunspacePool Method

Definition

Overloads

CreateRunspacePool(Int32, Int32, RunspaceConnectionInfo, PSHost, TypeTable) CreateRunspacePool(Int32, Int32, RunspaceConnectionInfo, PSHost, TypeTable)

Creates a RunspacePool on the specified remote runspace computer. maxRunspaces limits the number of Runspaces that can exist in this pool. The minimum pool size is set to minPoolSoze.

CreateRunspacePool() CreateRunspacePool() CreateRunspacePool()

Creates a RunspacePool with MaxRunspaces 1 and MinRunspaces 1.

CreateRunspacePool(InitialSessionState) CreateRunspacePool(InitialSessionState)

Creates a RunspacePool using the supplied initialSessionState. The minimum runspaces size is set to 1. The maximum runspaces size is set to 1.

CreateRunspacePool(Int32, Int32) CreateRunspacePool(Int32, Int32) CreateRunspacePool(Int32, Int32)

Creates a RunspacePool maxRunspaces limits the number of Runspaces that can exist in this pool. The minimum pool size is set to minPoolSoze.

CreateRunspacePool(Int32, Int32, PSHost) CreateRunspacePool(Int32, Int32, PSHost) CreateRunspacePool(Int32, Int32, PSHost)

Creates a RunspacePool using the supplied host, minRunspaces and maxRunspaces

CreateRunspacePool(Int32, Int32, RunspaceConnectionInfo) CreateRunspacePool(Int32, Int32, RunspaceConnectionInfo) CreateRunspacePool(Int32, Int32, RunspaceConnectionInfo)

Creates a RunspacePool on the specified remote computer. maxRunspaces limits the number of Runspaces that can exist in this pool. The minimum pool size is set to minPoolSoze.

CreateRunspacePool(Int32, Int32, InitialSessionState, PSHost) CreateRunspacePool(Int32, Int32, InitialSessionState, PSHost)

Creates a RunspacePool using the supplied initialSessionState, minRunspaces and maxRunspaces

CreateRunspacePool(Int32, Int32, RunspaceConnectionInfo, PSHost) CreateRunspacePool(Int32, Int32, RunspaceConnectionInfo, PSHost) CreateRunspacePool(Int32, Int32, RunspaceConnectionInfo, PSHost)

Creates a RunspacePool on the specified remote runspace computer. maxRunspaces limits the number of Runspaces that can exist in this pool. The minimum pool size is set to minPoolSoze.

CreateRunspacePool(Int32, Int32, RunspaceConnectionInfo, PSHost, TypeTable, PSPrimitiveDictionary) CreateRunspacePool(Int32, Int32, RunspaceConnectionInfo, PSHost, TypeTable, PSPrimitiveDictionary)

Creates a RunspacePool on the specified remote runspace computer. maxRunspaces limits the number of Runspaces that can exist in this pool. The minimum pool size is set to minPoolSoze.

CreateRunspacePool(Int32, Int32, RunspaceConnectionInfo, PSHost, TypeTable) CreateRunspacePool(Int32, Int32, RunspaceConnectionInfo, PSHost, TypeTable)

Creates a RunspacePool on the specified remote runspace computer. maxRunspaces limits the number of Runspaces that can exist in this pool. The minimum pool size is set to minPoolSoze.

public static System.Management.Automation.Runspaces.RunspacePool CreateRunspacePool (int minRunspaces, int maxRunspaces, System.Management.Automation.Runspaces.RunspaceConnectionInfo connectionInfo, System.Management.Automation.Host.PSHost host, System.Management.Automation.Runspaces.TypeTable typeTable);
static member CreateRunspacePool : int * int * System.Management.Automation.Runspaces.RunspaceConnectionInfo * System.Management.Automation.Host.PSHost * System.Management.Automation.Runspaces.TypeTable -> System.Management.Automation.Runspaces.RunspacePool
Parameters
minRunspaces
Int32 Int32 Int32

The minimum number of Runspace that should exist in this pool. Should be greater than 1.

maxRunspaces
Int32 Int32 Int32

The maximum number of Runspaces that can exist in this pool. Should be greater than or equal to 1.

connectionInfo
RunspaceConnectionInfo RunspaceConnectionInfo RunspaceConnectionInfo

RunspaceConnectionInfo object describing the remote computer on which this runspace pool needs to be created

host
PSHost PSHost PSHost

Host associated with this runspace pool

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

    If typeTable is null no custom serialization/deserialization can be done. Default PowerShell behavior will be used in this case.

Returns
Exceptions

Maximum Pool size is less than 1. Minimum Pool size is less than 1.

CreateRunspacePool() CreateRunspacePool() CreateRunspacePool()

Creates a RunspacePool with MaxRunspaces 1 and MinRunspaces 1.

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

CreateRunspacePool(InitialSessionState) CreateRunspacePool(InitialSessionState)

Creates a RunspacePool using the supplied initialSessionState. The minimum runspaces size is set to 1. The maximum runspaces size is set to 1.

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

initialSessionState to use when creating a new Runspace in the pool.

Returns
Exceptions

CreateRunspacePool(Int32, Int32) CreateRunspacePool(Int32, Int32) CreateRunspacePool(Int32, Int32)

Creates a RunspacePool maxRunspaces limits the number of Runspaces that can exist in this pool. The minimum pool size is set to minPoolSoze.

public static System.Management.Automation.Runspaces.RunspacePool CreateRunspacePool (int minRunspaces, int maxRunspaces);
static member CreateRunspacePool : int * int -> System.Management.Automation.Runspaces.RunspacePool
Public Shared Function CreateRunspacePool (minRunspaces As Integer, maxRunspaces As Integer) As RunspacePool
Parameters
minRunspaces
Int32 Int32 Int32

The minimum number of Runspaces that exist in this pool. Should be greater than or equal to 1.

maxRunspaces
Int32 Int32 Int32

The maximum number of Runspaces that can exist in this pool. Should be greater than or equal to 1.

Returns
Exceptions

Maximum runspaces is less than 1. Minimum runspaces is less than 1.

CreateRunspacePool(Int32, Int32, PSHost) CreateRunspacePool(Int32, Int32, PSHost) CreateRunspacePool(Int32, Int32, PSHost)

Creates a RunspacePool using the supplied host, minRunspaces and maxRunspaces

public static System.Management.Automation.Runspaces.RunspacePool CreateRunspacePool (int minRunspaces, int maxRunspaces, System.Management.Automation.Host.PSHost host);
static member CreateRunspacePool : int * int * System.Management.Automation.Host.PSHost -> System.Management.Automation.Runspaces.RunspacePool
Public Shared Function CreateRunspacePool (minRunspaces As Integer, maxRunspaces As Integer, host As PSHost) As RunspacePool
Parameters
minRunspaces
Int32 Int32 Int32

The minimum number of Runspaces that can exist in this pool. Should be greater than or equal to 1.

maxRunspaces
Int32 Int32 Int32

The maximum number of Runspaces that can exist in this pool. Should be greater than or equal to 1.

host
PSHost PSHost PSHost

The explicit PSHost implementation.

Returns

A local runspacepool instance.

Exceptions

CreateRunspacePool(Int32, Int32, RunspaceConnectionInfo) CreateRunspacePool(Int32, Int32, RunspaceConnectionInfo) CreateRunspacePool(Int32, Int32, RunspaceConnectionInfo)

Creates a RunspacePool on the specified remote computer. maxRunspaces limits the number of Runspaces that can exist in this pool. The minimum pool size is set to minPoolSoze.

public static System.Management.Automation.Runspaces.RunspacePool CreateRunspacePool (int minRunspaces, int maxRunspaces, System.Management.Automation.Runspaces.RunspaceConnectionInfo connectionInfo);
static member CreateRunspacePool : int * int * System.Management.Automation.Runspaces.RunspaceConnectionInfo -> System.Management.Automation.Runspaces.RunspacePool
Public Shared Function CreateRunspacePool (minRunspaces As Integer, maxRunspaces As Integer, connectionInfo As RunspaceConnectionInfo) As RunspacePool
Parameters
minRunspaces
Int32 Int32 Int32

The minimum number of Runspace that should exist in this pool. Should be greater than 1.

maxRunspaces
Int32 Int32 Int32

The maximum number of Runspaces that can exist in this pool. Should be greater than or equal to 1.

connectionInfo
RunspaceConnectionInfo RunspaceConnectionInfo RunspaceConnectionInfo

RunspaceConnectionInfo object describing the remote computer on which this runspace pool needs to be created

Returns
Exceptions

Maximum Pool size is less than 1. Minimum Pool size is less than 1.

CreateRunspacePool(Int32, Int32, InitialSessionState, PSHost) CreateRunspacePool(Int32, Int32, InitialSessionState, PSHost)

Creates a RunspacePool using the supplied initialSessionState, minRunspaces and maxRunspaces

public static System.Management.Automation.Runspaces.RunspacePool CreateRunspacePool (int minRunspaces, int maxRunspaces, System.Management.Automation.Runspaces.InitialSessionState initialSessionState, System.Management.Automation.Host.PSHost host);
static member CreateRunspacePool : int * int * System.Management.Automation.Runspaces.InitialSessionState * System.Management.Automation.Host.PSHost -> System.Management.Automation.Runspaces.RunspacePool
Parameters
minRunspaces
Int32 Int32 Int32

The minimum number of Runspaces that can exist in this pool. Should be greater than or equal to 1.

maxRunspaces
Int32 Int32 Int32

The maximum number of Runspaces that can exist in this pool. Should be greater than or equal to 1.

initialSessionState
InitialSessionState InitialSessionState InitialSessionState

initialSessionState to use when creating a new Runspace in the pool.

host
PSHost PSHost PSHost

The explicit PSHost implementation.

Returns
Exceptions

Maximum runspaces is less than 1. Minimum runspaces is less than 1.

CreateRunspacePool(Int32, Int32, RunspaceConnectionInfo, PSHost) CreateRunspacePool(Int32, Int32, RunspaceConnectionInfo, PSHost) CreateRunspacePool(Int32, Int32, RunspaceConnectionInfo, PSHost)

Creates a RunspacePool on the specified remote runspace computer. maxRunspaces limits the number of Runspaces that can exist in this pool. The minimum pool size is set to minPoolSoze.

public static System.Management.Automation.Runspaces.RunspacePool CreateRunspacePool (int minRunspaces, int maxRunspaces, System.Management.Automation.Runspaces.RunspaceConnectionInfo connectionInfo, System.Management.Automation.Host.PSHost host);
static member CreateRunspacePool : int * int * System.Management.Automation.Runspaces.RunspaceConnectionInfo * System.Management.Automation.Host.PSHost -> System.Management.Automation.Runspaces.RunspacePool
Public Shared Function CreateRunspacePool (minRunspaces As Integer, maxRunspaces As Integer, connectionInfo As RunspaceConnectionInfo, host As PSHost) As RunspacePool
Parameters
minRunspaces
Int32 Int32 Int32

The minimum number of Runspace that should exist in this pool. Should be greater than 1.

maxRunspaces
Int32 Int32 Int32

The maximum number of Runspaces that can exist in this pool. Should be greater than or equal to 1.

connectionInfo
RunspaceConnectionInfo RunspaceConnectionInfo RunspaceConnectionInfo

RunspaceConnectionInfo object describing the remote computer on which this runspace pool needs to be created

host
PSHost PSHost PSHost

Host associated with this runspace pool

Returns
Exceptions

Maximum Pool size is less than 1. Minimum Pool size is less than 1.

CreateRunspacePool(Int32, Int32, RunspaceConnectionInfo, PSHost, TypeTable, PSPrimitiveDictionary) CreateRunspacePool(Int32, Int32, RunspaceConnectionInfo, PSHost, TypeTable, PSPrimitiveDictionary)

Creates a RunspacePool on the specified remote runspace computer. maxRunspaces limits the number of Runspaces that can exist in this pool. The minimum pool size is set to minPoolSoze.

public static System.Management.Automation.Runspaces.RunspacePool CreateRunspacePool (int minRunspaces, int maxRunspaces, 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 CreateRunspacePool : int * int * System.Management.Automation.Runspaces.RunspaceConnectionInfo * System.Management.Automation.Host.PSHost * System.Management.Automation.Runspaces.TypeTable * System.Management.Automation.PSPrimitiveDictionary -> System.Management.Automation.Runspaces.RunspacePool
Parameters
minRunspaces
Int32 Int32 Int32

The minimum number of Runspace that should exist in this pool. Should be greater than 1.

maxRunspaces
Int32 Int32 Int32

The maximum number of Runspaces that can exist in this pool. Should be greater than or equal to 1.

connectionInfo
RunspaceConnectionInfo RunspaceConnectionInfo RunspaceConnectionInfo

RunspaceConnectionInfo object describing the remote computer on which this runspace pool needs to be created

host
PSHost PSHost PSHost

Host associated with this runspace pool

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

    If typeTable is null no custom serialization/deserialization can be done. Default PowerShell behavior will be used in this case.

applicationArguments
PSPrimitiveDictionary PSPrimitiveDictionary PSPrimitiveDictionary

Application arguments the server can see in ApplicationArguments

Returns
Exceptions

Maximum Pool size is less than 1. Minimum Pool size is less than 1.

Applies to