Mount CIFS Shares from Windows Command Line

Connect Network Drive

To map a network drive from windows command line:

  1. Click Start, and then click Run .
  2. In the Open box, type cmd to open command line window.
  3. 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:

  1. Open command line window.
  2. Type the following, replacing X: with drive letter of the shared resource:
    net use  Z: /delete