Logging out of a network share drive without reboot?
net use \\server\sharename /delete
EDIT: To cause the credentials to get flushed:
net use \\server\IPC$ /delete
If the net use
commands listed here do not do the trick, instead of rebooting, you can just restart the Workstation service (I'm not sure how to do this without the service restart though):
- First use the appropriate
net use
commands as above (e.g.net use * /del
for the shotgun approach). - Control Panel -> Administrative Tools -> Services
- Find Workstation in the list.
- Right click and choose Restart.
If you have any explorer windows open for the shared folder, or any open files, you may have to close them in order for the service to restart (if the restart appears to hang this is usually why).
Alternatively you can restart the service on the command line with:
net stop Workstation
net start Workstation
net start "Computer Browser"
The Computer Browser start is usually necessary as stopping Workstation also stops Computer Browser. You'll see if it does in the output from the first command. Again, closing explorer windows and open files may be necessary.
Reference: https://social.technet.microsoft.com/Forums/windows/en-US/58494ea1-e3a0-49ab-be5c-1aa2b86f13c9/how-to-logout-from-shared-folder
net use \\server\sharename /delete
See the full net use command here.