How to Mount CIFS Shares from Windows Command Line
Connect Network Drive
To map a network drive from windows command line:
- Click Start, and then click Run .
- In the Open box, type cmd to open command line window.
- Type the following, replacing Z: with drive letter you want to assign to the shared resource:
net use Z: \\computer_name\share_name /PERSISTENT:YES
Disconnect Network Drive
To disconnect a mapped drive:
- Open command line window.
- Type the following, replacing X: with drive letter of the shared resource:
net use Z: /delete