≡ Menu

Net use command

Net use is one of the important Windows commands that’s useful to manage network drives from CMD. Do you want to map a drive to a shared folder? or delete mapped drives? ‘Net use’ is the command you would need.

Below you can find the syntax of this command with some examples.

Map network drive from command prompt

Let’s say you have a network share \\RemotePC\Share which you want to map to a local drive. You can do that with the below command.

Net use * \\RemotePC\Share

The above command would map the share to the first available drive starting from Z: We can also specify the drive name in the place of ‘*’.

System error 85 has occurred

If you try to map to a network drive that’s not available(already mapped to another share), it throws this error.

c:\>net use Z: \\remptepc\share
System error 85 has occurred.
The local device name is already in use.

See Map network drive from command line for advanced options for net use and for specifying user name and passwords in the command line.

Delete/Disconnect a mapped drive

You can disconnect a mapped drive using ‘net use /delete’ command. For example, to disconnect the drive Z: the command is

net use  Z:  /delete

Delete all mapped network drives

You can delete all mapped drives using the below command.

net use * /delete

List all network drives and mapped shares

c:\>net use
New connections will be remembered.

Status       Local     Remote                    Network

-------------------------------------------------------------------------------
             Z:        \\remotepc\share
                                                Microsoft Windows Network
The command completed successfully.
5 comments… add one
  • SAJITHKUMAR U.M.

    Sir,
    My dot matrix printer connecting computer with usb cable. No printer port available in the computer. And I have 5 more computers through network. I wish to execute DOS PRINT from all these computers. I expect your valuable reply earliest.

  • Wellington Torrejais da Silva

    Thanks!!!

  • David

    I’m trying to map a drive with an & in the name but it’s not buying it. Any way round this?

    • Benjamin

      Try the ^ batch escape character. For example:

      echo mine & yours
      mine
      ‘yours’ is not recognized as an internal or external command,
      operable program or batch file.

      VS

      echo mine ^& yours
      mine & yours

  • Nikhat

    I am trying to net HP UX server from Windows server ?I am getting error: System error 67 has occurred, The Network name can not be found.
    Can someone suggest?

Cancel reply

Leave a Comment