Runspace.GetRunspaces Method (RunspaceConnectionInfo, PSHost)

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Queries the server for disconnected runspaces, using connection information and the client host, and creates an array of runspace objects associated with each disconnected runspace on the server. Introduced in Windows PowerShell 3.0.

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

public static Runspace[] GetRunspaces(
	RunspaceConnectionInfo connectionInfo,
	PSHost host
)

Parameters

connectionInfo
Type: System.Management.Automation.Runspaces.RunspaceConnectionInfo

The connection information for the target server.

host
Type: System.Management.Automation.Host.PSHost

The client host.

Return Value

Type: System.Management.Automation.Runspaces.Runspace[]

An array of Runspace objects, each in the Disconnected state.

Each runspace object in the returned array is in the Disconnected state and can be connected to the server by calling the Connect method on the runspace.

Return to top

Community Additions

ADD
Show: