Share via

Runspace.DisconnectAsync Method


Disconnects the runspace asynchronously.

 abstract void DisconnectAsync();
 abstract void DisconnectAsync();
 abstract void DisconnectAsync();
public abstract void DisconnectAsync ();
abstract member DisconnectAsync : unit -> unit
Public MustOverride Sub DisconnectAsync ()


RunspaceState is not Opened.


Disconnects the remote runspace and any running command from the server machine. Any data generated by the running command on the server is cached on the server machine. This runspace object goes to the disconnected state. This object can be reconnected to the server by calling the Connect() method. If the remote runspace on the server remains disconnected for the IdleTimeout value (as defined in the WSManConnectionInfo object) then it is closed and torn down on the server.

Applies to