Map a Network Drive from the Windows Command Line

Map a Network Drive from the Windows Command Line

Get Social!

Screen Shot 2014-01-16 at 15.21.41

The windows command line can be very useful to quickly perform repetitive tasks.

It is easy to write batch scripts which combine actions and can be easily triggered from the command line.

Mapping a network drive in Windows in a common task and can be done from the command line.  The syntax is:

net use [drive letter]: /persistent:[yes|no] "\\path\to\share"

The persistent command will make the mapped drive persist over reboots.

The below example maps drive Z to a server called fileserver.jamescoyle.net and the share homes.

net use z: /persistent:yes "\\fileserver.jamescoyle.net\homes"

Visit our advertisers

Quick Poll

How many Proxmox servers do you work with?

Visit our advertisers