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
- What net use does
- A note on Windows versions
- List your current connections
- Map a drive letter to a shared folder
- Let Windows pick the drive letter
- Paths with spaces in the name
- Connect with a different user name
- Keep a connection after you restart
- Disconnect a drive
- A typical sequence from start to finish
- Parameter reference
- Common net use errors
- Fix the most common errors
- Related guides
- Official sources
- More Windows guides
Net use quick answer
| Task | Command |
|---|---|
| List all connections | net use |
| Map a drive letter | net use E: \\server\share |
| Use the next free letter | net use * \\server\share |
| Connect as another user | net use E: \\server\share /user:Domain\User |
| Reconnect at every sign-in | net use /persistent:yes |
| Disconnect one drive | net use E: /delete |
| Disconnect everything | net 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
- Open Command Prompt.
- Type the command below and press Enter.
net useTo 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\lettersThat 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\User2Disk 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\lettersPaths 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\User1If 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.
| Setting | What it does |
|---|---|
| /persistent:yes | Saves each connection as you make it and restores it at the next logon |
| /persistent:no | Does not save the current or later connections, although connections already saved are still restored |
| Not specified | Uses 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: /deleteUsing an asterisk with /delete cancels every network connection.
net use * /deleteMicrosoft 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
- Run net use to see which drive letters and servers are already connected.
- Map the share with a free drive letter, adding /user if the share needs a different account.
- Add /persistent:yes if you want the drive back after the next sign-in.
- Run net use again to confirm the new connection appears in the list.
- 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
| Parameter | Meaning |
|---|---|
| Device name | D: to Z: for disks, LPT1: to LPT3: for printers, or * for the next free name |
| \\ComputerName\ShareName | The server and the shared resource |
| /user | Connects under a different user name |
| /savecred | Stores the supplied credentials for reuse |
| /smartcard | Uses the credentials on a smart card, and asks you to choose if several are present |
| /delete | Cancels the connection, or all connections with * |
| /persistent | Turns saved connections on or off |
| /home | Connects 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.
| Error | Microsoft description |
|---|---|
| 5 | Access is denied. |
| 53 | The network path was not found. |
| 65 | Network access is denied. |
| 67 | The network name cannot be found. |
| 85 | The local device name is already in use. |
| 1203 | The network path was either typed incorrectly, does not exist, or the network provider is not currently available. |
| 1219 | Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. |
| 1222 | The network is not present or not started. |
| 1311 | There are currently no logon servers available to service the logon request. |
| 1326 | The 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 /deleteYou can also run net use alone to see which connections to that server already exist, then delete them before reconnecting.
Related guides
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
- Microsoft Learn: net use (archived reference)
- Microsoft Learn: system error codes 0-499
- Microsoft Learn: system error codes 1000-1299
- Microsoft Learn: system error codes 1300-1699
More Windows guides
- How To Install .NET Framework 3.5 On Windows 11 (2026)
- How To Uninstall ESET From Windows Step By Step (2026)
- How To Uninstall Kaspersky Completely From Windows (2026)
- Local Security Authority Protection Is Off In Windows 11 (2026)
- How To Use Ping And Tracert In Windows 11 (2026)
- How To Change UAC Settings In Windows 11 (2026)
See all: Windows 11 Guides