PC & Windows Fixes

The Local Device Name Is Already in Use: Fix the Mapped Drive Error

Getting "The local device name is already in use" when mapping a drive? Find what holds the letter, clear the stale mapping and stop scripts from clashing.

On this page 8 sections
  1. Where you see the error and what each version means
  2. Find what is holding the drive letter
  3. Clear a stale or ghost mapping
  4. Logon scripts, Group Policy and Intune maps that collide
  5. VPN laptops and the morning reconnect
  6. Set drive letters once for the whole office
  7. When it isn’t the drive letter, and when to get help
  8. Common questions
Stacked storage server units filled with rows of hard drive bays

The local device name is already in use means Windows was asked to map a network share to a drive letter, say Z:, and Z: is already taken. In Command Prompt it appears as System error 85 has occurred; Microsoft’s name for it is ERROR_ALREADY_ASSIGNED. The share itself is usually fine. The problem is on your PC, in the list of letters Windows thinks are in use.

The fastest way to see who owns the letter: open Command Prompt (not as administrator) and run net use. If Z: is listed, often marked Unavailable or Disconnected, an old mapping is holding it. If Z: isn’t listed but still shows up in File Explorer, a USB drive, card reader or subst drive has it.

If you can’t reach the share at all, even by typing its path, that’s a different problem: see our guide to network path not found.

Try these first

  1. Run net use in a normal Command Prompt and look for the letter you’re trying to map.
  2. If it’s listed, remove it with net use Z: /delete (use your letter), then map the share again.
  3. Still blocked? Map to a different letter near the end of the alphabet, such as Y: or X:.
  4. Check This PC in File Explorer for a USB drive, SD card reader or phone that took the letter.
  5. On a VPN, connect the VPN first, then remap; a drive restored at sign-in before the VPN was up can leave a dead entry.
  6. Sign out and back in after removing mappings, so Windows rebuilds the list from scratch.

Where you see the error and what each version means

The same message turns up in several places, and where it appears tells you a lot about the cause.

Where it appearsMost likely causeWhat to do
net use Z: \\server\share returns System error 85Z: is still assigned to an old mapping, connected or notRun net use, delete the old entry, map again
Map network drive in File Explorer refuses a letterA remembered (persistent) mapping on that letter, or a local drive that grabbed itPick another letter, or clear the remembered mapping
A pop-up at sign-in: Windows is restoring network connections and the letter is already in useWindows restoring a saved mapping while a script or policy maps the same letterUse one method for each letter, not two
A logon script or Intune script fails on one letterThe script maps without removing the old mapping firstDelete, then map, in the script
Only happens on a laptop away from the officeThe mapping was restored before the VPN connectedConnect the VPN, delete and remap, or remap from a script after the VPN connects
A program run as administrator says the letter is in use, but your File Explorer doesn’t show itAdministrator and normal sessions keep separate drive listsCheck net use in both kinds of window

One wrinkle: Windows treats a mapping as in use even when it can’t reach the server. A drive with a red X still owns its letter until you delete it.

Find what is holding the drive letter

Check these in order. Each takes a few seconds.

1. Network mappings

In a normal Command Prompt, run net use. The Local column shows each letter and the Remote column shows the share it points to. Note the status: OK means connected; Unavailable or Disconnected means Windows remembers the mapping but isn’t using it. Either way, the letter is taken. In PowerShell, Get-SmbMapping shows the same list.

2. Virtual drives made with subst

Older programs and some accounting setups use subst to turn a folder into a drive letter. Run subst with no options to list them. These don’t show in net use, which is why they catch people out.

3. Local drives

Open File Explorer and look under This PC. USB sticks, external drives, built-in SD card readers and some phones take the next free letter after your internal drives. A card reader with no card inserted can still hold a letter. To see every volume and its letter, right-click Start and open Disk Management.

4. The other session

Windows keeps separate drive mappings for your normal session and for programs run with Run as administrator. Our mapped drive troubleshooting guide explains that split. If the error only appears inside an administrator window or an installer, run net use in an administrator Command Prompt too; the stale entry may live only there.

Clear a stale or ghost mapping

Once you know the letter is held by an old network mapping, remove it properly so it doesn’t come back at the next sign-in.

  1. Close any file or folder open from that drive. Windows won’t remove a mapping while a program is using it, and it may ask you to confirm if files are open.
  2. In a normal Command Prompt, run net use Z: /delete. Microsoft’s reference describes /delete as cancelling the connection, and it also removes a remembered one.
  3. In PowerShell, the equivalent is Remove-SmbMapping -LocalPath "Z:" -UpdateProfile. The -UpdateProfile switch, per Microsoft, removes the mapping persistently so it isn’t re-established at restart.
  4. Map the share again: net use Z: \\server\share /persistent:yes, or use Map network drive with Reconnect at sign-in ticked.

Be careful with net use * /delete. The asterisk cancels every network connection on the PC, not just the broken one, so you’ll need to remap them all. Write down the output of net use first.

A subst drive or local drive

For a subst drive, subst Z: /d removes it, but find out first what created it; if a startup shortcut or program recreates it, the clash returns tomorrow. For a USB drive or card reader, the cleaner fix is moving the local device: in Disk Management, right-click the volume, choose Change Drive Letter and Paths, then Change, and pick a letter well away from your network drives. Don’t change the letter of the Windows drive (usually C:) or of a drive that installed programs run from.

If the mapping keeps coming back

Windows stores remembered mappings in the user’s profile, under the registry key HKEY_CURRENT_USER\Network, one subkey per letter. If net use /delete reports success and the letter still reappears after sign-in, something is recreating it: a script, a Group Policy drive map or a sync tool. Look there before touching the registry. If you do edit it, export the key first, delete only the subkey for the one letter, and sign out afterwards.

Logon scripts, Group Policy and Intune maps that collide

In offices, the error is most often two mechanisms fighting over one letter. Windows restores a saved mapping for Z:, then a logon script tries to map Z: as well, and the second attempt fails with error 85. Pick one owner for each letter.

Logon scripts

A batch file with a bare net use Z: \\server\share line fails whenever Z: survived from yesterday. Delete first, then map, and make the script’s mapping non-persistent so Windows doesn’t also restore it:

  • net use Z: /delete
  • net use Z: \\server\share /persistent:no

Microsoft notes that the /persistent setting defaults to whatever was used last, so a script that never states it inherits someone’s earlier choice. Say it explicitly.

Group Policy Preferences drive maps

Drive maps live under User Configuration > Preferences > Windows Settings > Drive Maps. The action you choose matters:

ActionWhat Microsoft says it doesWhen to use it
CreateCreates a new mapped driveRarely; it doesn’t fix an existing wrong mapping
ReplaceDeletes and recreates the mapping, overwriting its settingsWhen a letter must always point to one share, even if users remapped it
UpdateChanges only the settings in the item and creates the mapping if it’s missingThe usual choice for day-to-day maps
DeleteRemoves a mapped driveRetiring an old letter or server

Two settings in the item cause conflicts. Reconnect saves the mapping in the user’s settings so Windows restores it at the next logon; if a script also maps that letter, turn one of them off. Use first available, starting at picks a free letter instead of a fixed one, which avoids the error but means people may get different letters.

Intune and other scripts

A PowerShell script deployed through Intune should remove before it adds: Remove-SmbMapping -LocalPath "Z:" -Force -UpdateProfile, then New-SmbMapping -LocalPath "Z:" -RemotePath "\\server\share" -Persistent $true. Wrap the removal so a missing mapping doesn’t stop the script, and run it in the user’s context, not as SYSTEM, or it maps drives the user never sees.

Rather have a technician sort it out?

With your approval, a technician can connect remotely, find what is holding the drive letter, remove the stale mapping and fix the script or policy that keeps recreating the clash. A GoProIT technician can connect remotely, with your permission, and fix it while you watch. $59 per fix, Mon–Fri 8am–8pm ET.

Get a $59 fix

VPN laptops and the morning reconnect

Remote staff see this error more than anyone. At sign-in, Windows tries to restore saved drives before the VPN connects. The restore fails, the letters stay reserved, and when the user, a script or the VPN client later maps the same letters, Windows says they’re in use.

  • Quick fix for one person: connect the VPN, run net use, delete the dead entries and map them again.
  • Better: let one thing own the mapping. Either remembered mappings, opened once the VPN is up, or a script that runs after the VPN connects, not both. Many VPN clients can run a script after connecting; check your VPN vendor’s documentation for the exact option.
  • Different error, same morning: if Windows instead says multiple connections to a server by the same user, using more than one user name, aren’t allowed, that’s a credentials clash (error 1219), not a letter clash. The credential steps are in the mapped drive guide linked earlier on this page.

If the drive then fails with a path error once the letter is free, the VPN probably isn’t giving the laptop the office DNS server. The network path guide linked at the top of this page covers name lookup over VPN.

Set drive letters once for the whole office

Letter clashes mostly come from each PC being set up slightly differently. A few rules stop them:

  • Write down a letter plan. For example S: for shared, P: for personal folders, Q: for accounting. Keep network letters at the end of the alphabet so USB drives, which take the first free letter, never reach them.
  • One mapping method per letter. Group Policy, an Intune script or a logon script, not a mix. When you switch methods, delete the old mappings with a Delete-action drive map or a one-time cleanup script.
  • Remove letters you retire. When a server or NAS is replaced, push a Delete action for its old letters before mapping the new ones.
  • Consider cloud libraries. If the team already uses Microsoft 365, SharePoint and OneDrive avoid drive letters and VPN timing altogether. Our Microsoft 365 support covers planning that move.

Offices that want this kept tidy over time can use the Business Support Plan, which includes unlimited remote help desk tickets for every user.

When it isn’t the drive letter, and when to get help

Error 85 is almost never a hardware fault. Stop and look elsewhere if:

  • Every letter fails, not just one. That points to a script or policy failing as a whole, or to the share itself; open it by typing \\server\share in the Run box to check.
  • The message changes after you free the letter. Network path errors, access denied or password prompts are server, network or account problems with their own fixes.
  • A letter keeps reappearing after you delete it, and you can’t find the script or policy that creates it. On a managed PC, your IT provider owns those settings; don’t fight them locally.
  • A card reader or USB port keeps grabbing letters erratically, appearing and disappearing. That can be a failing reader or port, and it’s worth testing with another device.

If you’d rather not dig through scripts and policies yourself, this is a typical $59 remote fix through remote computer help, done in a session you approve and can end at any time.

Common questions

What is system error 85?

System error 85 is Windows’ code for "The local device name is already in use." It means the drive letter you asked for is already assigned on this PC, usually to an older network mapping, sometimes to a USB drive, a card reader or a subst drive. It isn’t a server error. Free the letter or choose another one and the mapping normally works straight away.

How do I see which drive letters are in use?

Run net use in Command Prompt for network mappings, subst for virtual drives, and open Disk Management for physical drives and their letters. File Explorer’s This PC view shows most of them, but it hides mappings made in an administrator session, so check net use in an administrator window too if a program run as administrator reports the clash.

Will deleting a mapped drive delete my files?

No. Removing a mapping with net use /delete or Disconnect in File Explorer only removes the shortcut letter on your PC. The folder and its files stay on the server or NAS, and other people’s mappings aren’t affected. You can map the same share again at any time, to the same letter or a different one.

Why does the error appear every time I sign in?

Something maps the same letter twice at sign-in. Usually Windows restores a remembered mapping and a logon script or Group Policy item maps that letter again, or a VPN laptop restores drives before the VPN connects. Decide which method owns the letter, turn off Reconnect or persistence on the other, and remove the leftover mapping once.

Can I just pick another drive letter?

Yes, and it’s a fine quick fix for one person. The catch is shortcuts, macros, accounting software and saved file paths that expect the old letter; they’ll break if the share moves from Z: to Y:. In an office, it’s better to free the agreed letter so every PC keeps the same layout.

Book online in 2 minutes

Talk to a GoProIT technician

Pick a time that suits you. A technician calls you at the start time; for support sessions they send a secure link, and nothing happens on your computer until you approve it. Monday to Friday 8am to 8pm Eastern.

Secure checkout by Stripe. Free cancellation up to 2 hours before your session.

Still stuck? We can fix it remotely for $59 • IT help Mon–Fri 8am–8pm ET
📞 Call (844) 734-1288 WhatsApp Book a $59 fix
WhatsApp us(202) 960-2022 · messages