Export (0) Print
Expand All

Runspace.GetRunspaces Method (RunspaceConnectionInfo, PSHost)

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)

'Usage
Dim connectionInfo As RunspaceConnectionInfo
Dim host As PSHost
Dim returnValue As Runspace()

returnValue = Runspace.GetRunspaces(connectionInfo, host)

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

Parameters

connectionInfo

The connection information for the target server.

host

The client host.

Return Value

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.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

 

Target Platforms


Show:
© 2015 Microsoft