This is a video tutorial on how to Map network drive Via command line. We can map a network drive from windows command line using the net use command.
Z = would be the drive letter added to your computer
SERVER = is the network computer name
Photos = is the shared folder on the computer named Photos
The above command maps the drive letter Z: to the network share networkpcsharename. If the logged in user has credentials to access
this network share, the above command completes successfully without asking for username or password. Otherwise it will prompt for user name
and password and user has to credentials with which the share can be accessed. Upon providing this information, the share will be mapped to the drive Z:
We can also use * instead of Z:. This will automatically pick up the unused drive letter starting from Z:
You can also specify username and password in net use command. See examples below.
If you don’t want to type the password in plain text in the windows command line you can specify just the user name. Net use will prompt you for the password.
You can use Net use command to map webdav shares also.
Map system drive (C:) of remote computer
If you have administrator access to the network computer then you can map the system drive or any other drive of the remote computer with the below command.
net use networkpcC$ /u:username password