Windows Command Line
Mounting and Using Network Drives
use net use
example:
net use X: \\SERVER\ShareWhere X: is the drive letter you wish to map the share to, and \\SERVER\Share is the UNC path to the share. This should make the share visible in My Computer and the command line as well like all other shares mapped through the GUI.
In order to later disconnect the share, you would use
net use X: /deleteif you want to keep this mapping you can add the switch
/persistent:yesAlso, sometimes when you try to assign to something that is already assigned you may have to first/deletethe mapping. This is the case for printers mapped to LPT ports at least, and if you can't seem to get it working, try that.
Answer taken from this link
Last updated
Was this helpful?