Vas
asked on
Windows 10 - How to disconnect mapped network drives
I have a NAS, and in Windows 10 I have a couple of mapped drive set up to connect to the shares on the NAS.
I don't save the login when I authenticate to connect (cause, ransomeware), so after each reboot I just click on my mapped drive and login.
I want to be able to disconnect the mapped drives once I'm done moving files. But other than rebooting I haven't found a way that actually disconnects the drives.
The odd thing is that the command "net use" doesn't show any connections (even though I am connected and can browse my content on the share)
I tried this command (the mapped drive share is drive letter T:/ ) and it says it was successful but I can still use the share:
C:\>Net use t: /delete
t: was deleted successfully.
What command(s) should I be using to log out of these shares. I don't want to delete the drive mapping, just log out.
Thanks
I don't save the login when I authenticate to connect (cause, ransomeware), so after each reboot I just click on my mapped drive and login.
I want to be able to disconnect the mapped drives once I'm done moving files. But other than rebooting I haven't found a way that actually disconnects the drives.
The odd thing is that the command "net use" doesn't show any connections (even though I am connected and can browse my content on the share)
I tried this command (the mapped drive share is drive letter T:/ ) and it says it was successful but I can still use the share:
C:\>Net use t: /delete
t: was deleted successfully.
What command(s) should I be using to log out of these shares. I don't want to delete the drive mapping, just log out.
Thanks
Or you can go to Windows Explorer, click on This PC, go to the Ribbon, select drive tools, you should be able to disconnect the drive from there.
ASKER
My NAS is a Synology, yes I mostly use it for backup and some other things.
Ok so about the guidance so far..
Edward - I was able to disconnect that way, but could not easily reconnect. I had to map the network drive again (even though the mapped drive still showed in My PC), I mapped it to the same drive letter and it connected.
So that actually shows me that I don't want to simply disconnect - when I remapped it, it didn't ask again for authentication. This means malware/ransomware may be able to re-map this drive.
So maybe what I really need to accomplish is LOGGING OUT of the mapped drive, rather than disconnecting or removing it?
awawada - your first command had no results. I didn't try your other commands I'm looking for a way not to disrupt everything else I have open on my PC.
Ok so about the guidance so far..
Edward - I was able to disconnect that way, but could not easily reconnect. I had to map the network drive again (even though the mapped drive still showed in My PC), I mapped it to the same drive letter and it connected.
So that actually shows me that I don't want to simply disconnect - when I remapped it, it didn't ask again for authentication. This means malware/ransomware may be able to re-map this drive.
So maybe what I really need to accomplish is LOGGING OUT of the mapped drive, rather than disconnecting or removing it?
awawada - your first command had no results. I didn't try your other commands I'm looking for a way not to disrupt everything else I have open on my PC.
I would create a script and run this to simply disconnect
@echo off
Net use t: /delete
net use * /d
taskkill /f /IM explorer.exe
explorer.exe
Script_for_you.zip
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ivan Rosa's solution is the one that works best, I'd like to mark his as the best answer please.
ASKER
ivan rosa's answer is the best solution, I'd like to mark that one as the answer please.
@Vas.... I did mention that as well in my post above. Just an FYI. :)
ASKER
Hi Edward, for some reason I couldn't follow the steps as you posted them on my system. Thanks though, maybe it will work for someone else.
Sorry, I just type Windows Explorer on the run line and it comes up. Sorry I was not clearer in my instructions.
If I may ask, how did you get to "This PC" with no further instructions?
I see where I made my error I said "Drive Tools" not tools.
Can you try these commands (one after one):
net use * /d and
taskkill /f /IM explorer.exe
explorer.exe
after Net use t: /delete and check if you are still connected?
Is you NAS a backup?