Map | Drive From Command Line ((top))

net use \\server\share That’s right—you can net use a UNC path with no drive letter. It won’t appear as a drive, but it will be an authenticated, persistent connection that applications can still access via the full UNC path. Mastering net use and New-PSDrive turns drive mapping from a point-and-click chore into a scriptable, repeatable, and automatable operation. Whether you are deploying 200 workstations, maintaining a headless server, or simply tired of typing passwords into a dialog box, the command line offers speed, control, and depth that the GUI never will.

net use Z: \\server\share /persistent:yes Once you set /persistent:yes , subsequent net use commands (without specifying persistence) will also be persistent until you turn it off with /persistent:no . Sometimes you need to access a share with alternate credentials while logged into Windows with your standard account. The /savecred flag stores the password for future sessions: map drive from command line

But for IT professionals, power users, and automation enthusiasts, the graphical approach is a bottleneck. It’s slow, inconsistent across remote sessions, and impossible to script. The command line—specifically net use and, more recently, PowerShell’s New-PSDrive —offers speed, precision, and repeatability. net use \\server\share That’s right—you can net use

net use Z: \\server\share This maps the share \\server\share to drive letter Z: . If the share requires authentication, net use will prompt you for a username and password. But you can supply them inline for automation: Whether you are deploying 200 workstations, maintaining a