In some cases, the most convenient way to manage connections to shares is through batch files or Powershell scripts.  By using the "net use" command, creating and deleting connections can be automated according to company policy and requirements.


Connect to a Share

To connect to a share, use the "net use" command as follows:


net use $devicename \\$cachedrive\$sharename /u:$username $password


  • $devicename is an unused drive letter for the mapped drive, i.e. "z:".
  • $cachedrive is the hostname of the CacheDrive.  The IP address can also be used.
  • $sharename is the name of the share.
  • $username is the login name for the CacheDrive share.  If the share and local PC use the same username, the user may need to prefix the login name with the CacheDrive name, i.e. "mycachedrive\myusername".
  • $password (optional) is the user's password.  If the password is omitted, the user will be prompted for the password.


Disconnect from a Share

To disconnect from a share, use the "net use" command as follows:


net use $devicename /delete


To disconnect from all shares, replace $devicename with asterisk (*).


List All Connections

To list all connections, use the "net use" command without any options.