Partager via


Runspace.Disconnect Method

Definition

Disconnects the runspace synchronously.

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

Exceptions

RunspaceState is not Opened.

Remarks

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