RunspacePool Members

Maintains a group of runspaces that have the same characteristics and can be opened and closed on an as-needed basis. Runspace pools can be used to execute multiple commands concurrently, with each command invoked in a different runspace. This class is introduced in Windows PowerShell 2.0.

The following tables list the members exposed by the RunspacePool type.

  Name Description
public property ApartmentState Gets and sets the apartment state of the thread used to run the commands in the runspaces of the pool. This property is introduced in Windows PowerShell 2.0.
public property CleanupInterval Gets or sets the time interval that determines how often unused runspaces are disposed. Introduced in Windows PowerShell 3.0.
public property ConnectionInfo Gets information about the connection used to open the runspaces of the pool on a computer that is typically a remote computer. This property is introduced in Windows PowerShell 2.0.
public property InitialSessionState Gets or sets information about the initial session-state used when creating the runspaces of the pool. This property is introduced in Windows PowerShell 2.0.
public property InstanceId Gets the identifier for an instance of the RunspacePool object. This property is introduced in Windows PowerShell 2.0.
public property IsDisposed Gets a value that indicates whether the RunspacePool object is disposed. When disposed, the resources used by the object are freed. This property is introduced in Windows PowerShell 2.0.
public property RunspacePoolAvailability Gets the availability of the runspace pool. Introduced in Windows PowerShell 3.0.
public property RunspacePoolStateInfo Gets information about the current state of the runspace pool. This property is introduced in Windows PowerShell 2.0.
public property ThreadOptions Gets and sets how new threads are created for each runspace of the pool. This property is introduced in Windows PowerShell 2.0.
Top

(see also Protected Methods)
 NameDescription
public methodBeginCloseCloses the runspaces in the pool and releases all the asynchronous operations that are waiting for a runspace. If the pool is already closed, closing, or not working, this method returns without doing anything. This method is introduced in Windows PowerShell 2.0.
public methodBeginConnectConnects the runspace pool asynchronously. The runspace pool must be in disconnected state. Introduced in Windows PowerShell 3.0.
public methodBeginDisconnectDisconnects the runspace pool asynchronously. The runspace pool must be in opened state. Introduced in Windows PowerShell 3.0.
public methodBeginOpenOpens the runspace pool for asynchronous operations. The pool must be opened before it can be used to create a runspace. This method is introduced in Windows PowerShell 2.0.
public methodCloseCloses the runspace pool and clears all the internal resources. This method closes all open runspaces in the pool and releases any asynchronous operations that are waiting for a runspace. This method is introduced in Windows PowerShell 2.0.
public methodConnectSynchronously connects the remote runspace pool to the remote server and sets the runspace pool state to opened. If the object is a local runspace pool, a not supported exception is thrown. Introduced in Windows PowerShell 3.0.
public methodCreateDisconnectedPowerShellsCreates an array of PowerShell objects that are in the disconnected state for all currently disconnected running commands associated with this runspace pool. Introduced in Windows PowerShell 3.0.
public methodDisconnectSynchronously disconnects the remote runspace pool from the remote server and sets the runspace pool state to disconnected. If the object is a local runspace pool, a not supported exception is thrown. Introduced in Windows PowerShell 3.0.
public methodDisposeReleases the resources used by the RunspacePool object. This method is introduced in Windows PowerShell 2.0.
public methodEndCloseWaits for the pending BeginClose operation to be completed. This method is introduced in Windows PowerShell 2.0.
public methodEndConnectWaits for the pending asynchronous BeginConnect method call to complete. Introduced in Windows PowerShell 3.0.
public methodEndDisconnectWaits for the pending asynchronous BeginDisconnect method call to complete. Introduced in Windows PowerShell 3.0.
public methodEndOpenWaits for any pending asynchronous BeginOpen operation to be complete. This method is introduced in Windows PowerShell 2.0.
public methodEquals  (Inherited from Object)
public methodGetApplicationPrivateDataRetrieves private data that is used by runspace pools opened on remote computers.
public methodGetAvailableRunspacesRetrieves the number of available runspaces of the pool. This method is introduced in Windows PowerShell 2.0.
public methodGetCapabilitiesRetrieves the capabilities of the runspace pool. Introduced in Windows PowerShell 3.0.
public methodGetHashCode  (Inherited from Object)
public methodGetMaxRunspacesRetrieves the maximum number of runspaces that the pool can maintain. This method is introduced in Windows PowerShell 2.0.
public methodGetMinRunspacesRetrieves the minimum number of runspaces that Windows PowerShell will keep open. This method is introduced in Windows PowerShell 2.0.
public methodstaticGetRunspacePoolsOverloaded. Queries the server for disconnected runspace pools and creates an array of runspace pool objects associated with each disconnected runspace pool on the server. Introduced in Windows PowerShell 3.0.
public methodGetType  (Inherited from Object)
public methodOpenOpens the runspace pool for synchronous operations. The runspace pool must be opened before it can be used to create runspaces. This method is introduced in Windows PowerShell 2.0.
public methodSetMaxRunspacesSets the maximum number of runspaces that the pool can maintain at one time. All requests greater than that number remain queued until runspaces become available. This method is introduced in Windows PowerShell 2.0.
public methodSetMinRunspacesSets the minimum number of runspaces that Windows PowerShell will keep open. By default, Windows PowerShell will keep a single runspace open. This method is introduced in Windows PowerShell 2.0.
public methodToString  (Inherited from Object)
Top

(see also Extension Methods)
 NameDescription
protected methodFinalize  (Inherited from Object)
protected methodMemberwiseClone  (Inherited from Object)
Top

  Name Description
public extension method As  Use this method to adapt an object from a foreign app domain to a known interface in this app domain.This element is introduced in Windows PowerShell 5.0. (Defined by RequestExtensions.)
public extension method As  This is called to adapt an object from a foreign app domain to a known interface in this appDomainThis element is introduced in Windows PowerShell 5.0. (Defined by RequestExtensions.)
public extension method As  Adapts an object from a foreign app domain to a known interface in this app domain.This element is introduced in Windows PowerShell 5.0. (Defined by RequestExtensions.)
public extension method Extend  Use this method to adapt and extend an object so that you can pass it to a foreign app domain.This element is introduced in Windows PowerShell 5.0. (Defined by RequestExtensions.)
public extension method Extend  This is called to adapt and extend an object that we wish to pass to a foreign app domainThis element is introduced in Windows PowerShell 5.0. (Defined by RequestExtensions.)
public extension method Extend  Used to extend an object with an interface from a foreign app domain.This element is introduced in Windows PowerShell 5.0. (Defined by RequestExtensions.)
public extension method ToEnumerable  This element is introduced in Windows PowerShell 5.0. (Defined by CollectionExtensions.)
Top

  Name Description
public event StateChanged Occurs when the state of the runspace pool changes. This event is introduced in Windows PowerShell 2.0.
Top


Show: