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.


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)

[SuppressMessageAttribute("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId="Runspaces")] 
public static Runspace[] GetRunspaces (
	RunspaceConnectionInfo connectionInfo,
	PSHost host
)
/** @attribute SuppressMessageAttribute("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId="Runspaces") */ 
public static Runspace[] GetRunspaces (
	RunspaceConnectionInfo connectionInfo, 
	PSHost host
)
SuppressMessageAttribute("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId="Runspaces") 
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

Windows 98, Windows 2000, Windows 2000 Server, Windows CE, Windows Server 2008, Windows 98 Second Edition, Pocket PC, Smart Phone, Windows Server 2003, Windows XP Professional, Windows Vista, Windows Server 2003 R2, Windows XP, Windows 7, Windows 2008 R2, Windows Developer Preview, Windows Server Developer Preview

Send comments about this topic to Microsoft.
Show:
© 2014 Microsoft