Runspace.GetRunspace Method

Definition

Returns a single disconnected Runspace object targeted to the remote computer and remote session as specified by the connection, session Id, and command Id parameters.

public:
 static System::Management::Automation::Runspaces::Runspace ^ GetRunspace(System::Management::Automation::Runspaces::RunspaceConnectionInfo ^ connectionInfo, Guid sessionId, Nullable<Guid> commandId, System::Management::Automation::Host::PSHost ^ host, System::Management::Automation::Runspaces::TypeTable ^ typeTable);
public static System.Management.Automation.Runspaces.Runspace GetRunspace (System.Management.Automation.Runspaces.RunspaceConnectionInfo connectionInfo, Guid sessionId, Guid? commandId, System.Management.Automation.Host.PSHost host, System.Management.Automation.Runspaces.TypeTable typeTable);
static member GetRunspace : System.Management.Automation.Runspaces.RunspaceConnectionInfo * Guid * Nullable<Guid> * System.Management.Automation.Host.PSHost * System.Management.Automation.Runspaces.TypeTable -> System.Management.Automation.Runspaces.Runspace
Public Shared Function GetRunspace (connectionInfo As RunspaceConnectionInfo, sessionId As Guid, commandId As Nullable(Of Guid), host As PSHost, typeTable As TypeTable) As Runspace

Parameters

connectionInfo
RunspaceConnectionInfo

Connection object for the target server.

sessionId
Guid

Id of a disconnected remote session on the target server.

commandId
Nullable<Guid>

Optional Id of a disconnected command running in the disconnected remote session on the target server.

host
PSHost

Optional client host object.

typeTable
TypeTable

Optional TypeTable object.

Returns

Disconnected runspace corresponding to the provided session Id.

Applies to