Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

The drive is disconnected, and I'm off the network. How do I unmap the drive?

This seems like it should be a simple procedure, but I'm missing something. My Google-fu is weak today...

share|improve this question

4 Answers 4

up vote 13 down vote accepted

I can't test this here as I'm not on a network, but I think it's a case of doing this:

  1. Right-click Network in Windows Explorer.
  2. Select Disconnect network drive....
  3. In the list that appears, right-click the drive you wish to remove and select Remove.

I think it's something like that but as I say, I can't test it here.

share|improve this answer

On the command line (substitute your drive letter for z):

net use z: /delete
share|improve this answer
2  
You don't even need to type in delete, you can get away with just del. Look at how much quicker you can disconnect! –  Mitch Dec 1 '11 at 19:30
1  
This does not work with disconnected drives! –  Tom Jun 17 '13 at 15:28
1  
This is much better than using the Windows Explorer approach if the drive isn't currently accessible. Even in Windows 8 you have to wait quite some time for the right-click context menu to appear for an unavailable mapping. With the command line approach it's immediate. –  Bern Jun 28 '13 at 8:26

On the command line, try:

net use

This shows all currently mapped drives. If the one you're looking for is in the list, you can use:

net use x: /delete

where X: is the drive you're trying to remove. But if the drive has been removed, there may be no such drive letter shown. In that case, just type the Remote identifier for the mapping:

net use 192.168.10.11\WorkFiles /delete
share|improve this answer

For the disconnected drive, for those who have SQL Server Management Studio in your pc, just run this query.

Exec master.dbo.xp_cmdshell 'net use x: /delete'

  • change the 'x' according to the drive name..
  • not sure if it will work with other database..
  • if your xp_cmdshell is not working or inactive, and this error occurs:

SQL Server blocked access to procedure 'sys.xp_cmdshell' of component 'xp_cmdshell' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'xp_cmdshell' by using sp_configure. For more information about enabling 'xp_cmdshell', see "Surface Area Configuration" in SQL Server Books Online.

Enable the xp_cmdshell by running this query:

-- To allow advanced options to be changed.
EXEC sp_configure 'show advanced options', 1
GO
-- To update the currently configured value for advanced options.
RECONFIGURE
GO
-- To enable the feature.
EXEC sp_configure 'xp_cmdshell', 1
GO
-- To update the currently configured value for this feature.
RECONFIGURE
GO
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.