Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a script running on Windows 7 Professional SP1 x64 that maps the first available network drive to a network resource, uses it, and then deletes the mapping.

Unfortunately, after deleting the mapping, the script still does not show the drive letter as being available for the next usage.

Drives are mapped by the NET USE command:

net use A: \\\network\resource /persistent:no /user:MYCORP\username password

Drives are unmapped by the same NET USE command:

net use A: /delete

I find the used drive letters by the WMIC command:

wmic logicaldisk get caption | findstr /r /v "^Caption ^$"

Can anybody explain why the WMIC command shows drive letters that have been returned to the system after the net use /delete command as still being used?

Thanks, PaulH


The fsutil fsinfo drives command also shows the unampped drive as still in use.

share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.