≡ 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.
10 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?

  • Rembo

    hi, how to fix this problem “the network path was not found”
    and any “net use” command run show this massage “the network path was not found”
    please sir how to solve this problem…………….

  • Anonymous

    David, try adding a backslash, so this one”\” and not this one “/” but it infront of the &
    that might work

  • Mohammad

    Thanks a lot for explanation. It saved me lot headaches writing into a Share drive out of Jenkins.

  • Obeid

    I have add a file from Server to my PC as a net-drive , but it does not appear when I use another PC connected to same Domen.
    I would be grateful if someone help me ???

  • Scarlett

    I want to isolate the remote name field for a drive, does anyone know how I could do this?
    ***
    PS S:\> net use s:
    Local name S:
    Remote name \\server\folder
    Resource type Disk
    Status OK
    # Opens 3
    # Connections 1
    The command completed successfully.
    ***
    This is what I have, but I want to return the Remote Name value only.

Cancel reply

Leave a Comment