|

How To Use The Net Use Command In Windows (2026)

The net use command connects a computer to a shared folder or printer, lists your connections, and disconnects them.

It runs in Command Prompt, so you can map the same drive letter every time without clicking through File Explorer.

This guide uses Microsoft’s own reference for the command and its published error-code lists.

Table of Contents

Net use quick answer

TaskCommand
List all connectionsnet use
Map a drive letternet use E: \\server\share
Use the next free letternet use * \\server\share
Connect as another usernet use E: \\server\share /user:Domain\User
Reconnect at every sign-innet use /persistent:yes
Disconnect one drivenet use E: /delete
Disconnect everythingnet use * /delete

What net use does

Microsoft describes net use as the command that connects a computer to a shared resource, disconnects it, or displays information about computer connections.

It also controls persistent network connections, which are the ones Windows restores when you sign in again.

If you type net use with no parameters, it lists the current network connections.

A note on Windows versions

Microsoft’s net use page is archived, was last updated in August 2016, and lists Windows 8 and earlier in its applies-to line.

Microsoft’s current Windows commands index, which lists Windows 11 and Windows 10, does not include a net use entry.

The syntax below follows the archived page, so run net use /? on your own PC if a switch behaves differently.

List your current connections

  1. Open Command Prompt.
  2. Type the command below and press Enter.
net use

To check one connection only, add its device name, for example net use E:.

Map a drive letter to a shared folder

Give net use a drive letter and the path of the share in the form \\ComputerName\ShareName.

net use E: \\financial\letters

That example from Microsoft assigns drive letter E: to the Letters shared directory on the Financial server.

You can add folders after the share name, as in Microsoft’s example that maps M: to the User2 directory inside Letters on the same server.

net use m: \\financial\letters\User2

Disk drives use letters D: through Z:, and printers use LPT1: through LPT3:.

Let Windows pick the drive letter

Type an asterisk in place of the device name and net use assigns the next available device name.

net use * \\financial\letters

Paths with spaces in the name

If the computer name contains spaces, enclose the path in quotation marks.

net use K: "\\Computer Name\Share Name"

Microsoft says leaving the quotation marks out produces an error message.

The computer name itself can be 1 to 15 characters long.

Connect with a different user name

Add the /user switch to make the connection under another account, with an optional domain in front of the name.

net use D: \\server\share /user:Accounts\User1

If you leave the domain out, net use uses the domain you are currently logged on to.

To avoid typing a password on the command line, put an asterisk where the password goes and Windows prompts for it without showing the characters.

The /savecred switch stores the credentials you supply so they can be reused.

Keep a connection after you restart

The /persistent switch controls whether connections come back at the next logon.

SettingWhat it does
/persistent:yesSaves each connection as you make it and restores it at the next logon
/persistent:noDoes not save the current or later connections, although connections already saved are still restored
Not specifiedUses the setting from last time

Connections made without a device name are never persistent.

If a saved drive shows as disconnected after a restart, see our guide to mapped drives that will not reconnect.

Disconnect a drive

Add /delete to the drive letter to cancel that one connection.

net use f: /delete

Using an asterisk with /delete cancels every network connection.

net use * /delete

Microsoft notes you cannot disconnect a shared directory that is your current drive or is in use by an active process.

A typical sequence from start to finish

  1. Run net use to see which drive letters and servers are already connected.
  2. Map the share with a free drive letter, adding /user if the share needs a different account.
  3. Add /persistent:yes if you want the drive back after the next sign-in.
  4. Run net use again to confirm the new connection appears in the list.
  5. When you no longer need it, disconnect it with /delete and the drive letter.

Closing any File Explorer window or program that is using the drive first avoids the in-use limit Microsoft describes.

Parameter reference

ParameterMeaning
Device nameD: to Z: for disks, LPT1: to LPT3: for printers, or * for the next free name
\\ComputerName\ShareNameThe server and the shared resource
/userConnects under a different user name
/savecredStores the supplied credentials for reuse
/smartcardUses the credentials on a smart card, and asks you to choose if several are present
/deleteCancels the connection, or all connections with *
/persistentTurns saved connections on or off
/homeConnects the user to their home directory

Common net use errors

Microsoft publishes the text of the Windows system error codes, and these are the ones that most often show up with net use.

ErrorMicrosoft description
5Access is denied.
53The network path was not found.
65Network access is denied.
67The network name cannot be found.
85The local device name is already in use.
1203The network path was either typed incorrectly, does not exist, or the network provider is not currently available.
1219Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed.
1222The network is not present or not started.
1311There are currently no logon servers available to service the logon request.
1326The user name or password is incorrect.

Fix the most common errors

For error 85, pick a different drive letter or use the asterisk so Windows chooses a free one.

For errors 53, 67 and 1203, recheck the server name and share name for typos, and add quotation marks if the name contains spaces.

For error 1326, retype the user name and password, including the domain if the account needs one.

For error 1219, Microsoft’s text says to disconnect all previous connections to the server or shared resource and try again.

net use \\server\share /delete

You can also run net use alone to see which connections to that server already exist, then delete them before reconnecting.

If you prefer File Explorer to the command line, read how to map a network drive in Windows 11.

To make a folder available to others on your network first, read how to share a folder on your network.

To see what your PC is connected to right now, read how to see active network connections with netstat.

Official sources

Leave a Reply

Your email address will not be published. Required fields are marked *