You are here

Howto force a disconnect network drive in Windows with net use /delete

There is an undocumented switch to force to disconnect a network drive:

NET USE K: /DELETE /YES

The /YES switch forces the disconnection, also if files are open, the disconnect succeeds without promting the user.