Net use fails with error 0X0000093A (NERR_TooManyEntries)
Quick answer for advanced users: reduce the number of mapped drives or network connections. Error means Windows' buffer for network enumeration is full.
Quick Answer
Run net use * /delete in an admin command prompt to disconnect all network drives, then re-add only the ones you need. If that doesn't work, bump the MaxCmds registry value under HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters to 256.
What This Error Actually Means
I've seen 0X0000093A (NERR_TooManyEntries) mostly on older Windows 10 builds and Windows Server 2016 machines that have accumulated a pile of mapped drives over time. A client last month had 30+ drives mapped across several file servers, and every time they tried to map one more, boom — this error. Under the hood, Windows uses a fixed-size buffer (default 50 entries) to enumerate network connections (like open files, sessions, and drives). When you hit that limit, the API call fails with “The buffer for types is not big enough.” It's not a real memory issue — it's a design limitation from the NT 4 era that Microsoft never bothered to raise.
Fix Steps
- Open Command Prompt as Admin — Hit Win+X, choose “Terminal (Admin)” or “Command Prompt (Admin).”
- List all current connections:
net use— see how many are there. If it's over 40, you're close to the cliff. - Delete all network drives:
net use * /delete /yes— this kills every mapped drive. Don't panic, they're not gone forever. You can re-add them. - Re-map only essential drives:
net use Z: \\server\share /persistent:yes. Keep it under 25 if possible. - Check if error is gone: Try the command that failed before. If it works, you're done.
If That Doesn't Work — Registry Tweak
Sometimes even after cleaning up, Windows still throws the error because the buffer size itself is too small. This is a legitimate fix for environments where you must have many connections (e.g., a file server with 100+ shares).
- Open Regedit as admin (
regedit). - Go to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters. - If
MaxCmdsdoesn't exist, create it as a DWORD (32-bit). - Set it to
256(decimal). Some sysadmins go up to 512, but I've seen stability issues above 300. Stick with 256. - Restart the
LanmanWorkstationservice: runnet stop LanmanWorkstation && net start LanmanWorkstationin admin prompt. - Test again.
Alternative Fix — Disable Unused Mapped Drives via GPO
If you're in a domain environment and users keep hitting this because of login scripts that map every share under the sun, use Group Policy to limit the number of persistent drives. Set a logon script that deletes drives not in a whitelist. I had a hospital with 80+ drives mapped via legacy scripts — clearing those dropped the error rate to zero.
Prevention Tip
Keep mapped drives under 25. Use DFS namespaces instead of raw UNC paths to reduce entries. And if you're on Windows Server 2019 or later, consider using PowerShell New-PSDrive with -Persist — it's more efficient than old-school net use. Also, reboot your workstation weekly; stale connections pile up silently.
Real-world note: I once spent three hours chasing this on a customer's Windows 10 1809 box only to find they had 47 drives mapped from a single file server. Ran
net use * /delete, mapped back the critical 10, and it never came back. Don't overthink it.
Was this solution helpful?