If you have a drive that won't connect or shows an error, clear out all existing connections before re-mapping: List all drives Delete a specific drive net use Z: /delete Wipe all mappings net use * /delete /yes Petri IT Knowledgebase Quick Reference Table Flag/Command Why use it? Stay mapped after reboot /persistent:yes Keeps the drive active across sessions. Secure login /user:Name * Prompts for a password without showing it. Quick unmap Removes the mapping instantly. View active drives Shows all current UNC paths and letters. How to Mount CIFS Shares from Windows Command Line

Do you need to connect to these drives over a ?

Z: \\server\share1 Y: \\server\share2

net use * /delete /y

Now your script contains cmdkey (which can be encrypted in your environment) rather than plain text passwords.

Here is a hidden gem: You can map a network resource consuming a drive letter. This is "better" because drive letters are a limited resource (A: through Z:).

If you are scripting or want a more "intelligent" map, PowerShell is superior. It treats the network location as a "drive" within the environment, which is faster and more reliable for background tasks. The Command:

Mapping network drives using the Command Prompt is a powerful and efficient way to manage your network resources. By mastering the `net use` command, you can automate the process, gain more control over your network drives, and enhance your productivity. Whether you're a system administrator managing a large network or a casual user looking to streamline your workflow, learning to map network drives with cmd is a valuable skill that can benefit you in many ways. With practice and experience, you'll find that using the Command Prompt to manage your network drives is not only better but also an indispensable part of your computing toolkit.

The * prompts for password (hidden input). Safer than typing password in plain text.

(this returns you to your previous directory and removes the temporary mapping). 4. Troubleshooting "Ghost" Drives

To make this script match your network layout, please tell me: What do you prefer to use? Do your users connect locally or over a VPN ?

Instead of right-click > Disconnect ten times:

Use * to prompt for a password securely (the text won't show on screen):

I can provide the exact scripts or security measures for your environment. Share public link