Disconnect-SmbShare

Disconnects a connected network drive.


Settings:

  • Local drive letter
    Drive letter of the network drive to be disconnected.
  • Disconnect only if no file is open
    Disconnect drive only if there are no more open file handles for the destination drive.


Example:

In the following example, the Z: drive is disconnected regardless of whether files from this drive are still in access.


Corresponds to DSM eScript command:

  • NetDisconnect


See also: