How to Use Net Use command in Windows 11

The net use command is a built-in Windows networking utility that allows you to connect to, disconnect from, and manage shared resources (like network drives, printers, and shared folders) on a local or remote network.

If you often work with shared files or servers, learning how to use net use can save you time — especially when mapping drives or automating connections through scripts.

In this guide, we’ll explain what the Net Use command does, how to use it, and share practical examples to make network management on Windows 11 easier.

What Is the net use Command?

The net use command lets you connect your Windows PC to shared folders or drives over a local network or domain. It’s commonly used to:

  • Map shared folders or drives to a drive letter.
  • Connect to password-protected network resources.
  • View active network connections.
  • Disconnect mapped network drives.

You can use it via Command Prompt or PowerShell, and it’s particularly useful for system administrators, IT professionals, and advanced users managing multiple network systems.

Syntax of the Net Use Command

Here’s the basic syntax for net use:

net use [DriveLetter:] \\ComputerName\SharedFolder [Password] [/user:UserName] [/persistent:{yes | no}]

Let’s break it down:

ParameterDescription
DriveLetter:Optional. Assigns a drive letter to the shared resource (like Z:).
\ComputerName\SharedFolderThe path to the shared resource you want to access.
PasswordThe password for the shared resource (if required).
/user:Specifies a username to connect with.
/persistent:Saves the connection so it’s automatically reconnected after restart.

Step 1: Open Command Prompt as Administrator

To use net use, you need to open Command Prompt (Admin):

  1. Press Windows + X and select Windows Terminal (Admin) or Command Prompt (Admin).
  2. You can now enter net use commands directly.

Step 2: View Current Network Connections

To see all your current network drives or connections, use:

net use

This will display a list of all connected drives, including drive letters, remote paths, and connection statuses.

Step 3: Map a Network Drive

To map a shared network folder to a drive letter, use the following format:

net use Z: \\ComputerName\SharedFolder

Example:

net use Z: \\OfficeServer\Documents

This command maps the shared folder “Documents” from the “OfficeServer” to drive Z: on your local machine.

Step 4: Connect Using Credentials

If the shared folder is password-protected, use the /user: parameter:

net use Z: \\ComputerName\SharedFolder /user:username password

Example:

net use Z: \\Workstation01\SharedDocs /user:Admin mypassword123

This command connects to the shared folder using the “Admin” username and “mypassword123” password.

Step 5: Make the Connection Persistent

If you want Windows to automatically reconnect the network drive after restart, use the /persistent:yes parameter:

net use Z: \\Server01\Share /persistent:yes

To make it a one-time connection, use /persistent:no.

Tip: Persistent connections are perfect for office networks where shared drives are used daily.

Step 6: Disconnect a Network Drive

If you want to disconnect a network drive, simply use:

net use Z: /delete

Example:

net use Z: /delete /y

The /y parameter automatically confirms the disconnection without asking for confirmation.

Step 7: Connect to a Shared Printer

You can also use net use to connect to a shared network printer:

net use LPT1: \\ComputerName\PrinterName /persistent:yes

Example:

net use LPT1: \\OfficePC\HP_LaserJet /persistent:yes

This will map the shared printer to the LPT1 port for easy access.

Step 8: Delete All Network Connections

If you want to disconnect all mapped drives at once:

net use * /delete

Windows will prompt you to confirm — type Y and press Enter to remove all active connections.

Step 9: Use Net Use in Batch Scripts

You can automate network drive mapping using a simple batch file.

Example:

@echo off
net use Z: \\Server\Share /user:Admin password /persistent:yes
pause

Save this file as mapdrive.bat and run it anytime you need to reconnect network drives automatically.

Common net use Error Fixes

Here are some common issues you might encounter when using the net use command — and how to fix them:

If you encounter Error 53 – The network path was not found, it usually means there’s a problem with the connection or the folder name. Double-check the spelling of the server and the shared folder, and make sure both devices are connected to the same network.

For Error 67 – The network name cannot be found, the issue often lies with the shared folder itself. It might not exist anymore or could be offline, so verify that the shared folder path is correct and accessible.

If you see Error 1219 – Multiple connections to a server by the same user, it indicates there are already existing connections to that server. To fix it, disconnect all current connections before reconnecting by running the command net use * /delete in Command Prompt.

Lastly, if you receive an Access Denied message, ensure that you’re using the right credentials. Try using the /user: parameter with the correct username and password, or confirm that you have permission to access the shared resource.

Advanced Usage Examples

Map a Drive to a Specific Domain User:

net use Z: \\DomainServer\Shared /user:CORP\AdminUser password

Map a Drive Without a Drive Letter:

net use \\Server\Share /user:username password

View Detailed Network Information:

net use | more

Map a Drive and Save Output to a Log File:

net use Z: \\Server\Share /user:username password >> C:\logs\netuse.txt

Wrapping Up

The net use command is one of the most versatile tools for managing network connections in Windows 11. Whether you’re connecting to shared drives, managing printers, or automating login scripts, it gives you fast and reliable control directly from the command line.

You can use net use to map or disconnect drives, include the /user: parameter to authenticate with specific credentials, and add /persistent:yes if you want your connections to automatically reconnect after a restart.

When you need to clear existing connections, simply use the /delete option to remove them. Once you get comfortable with net use, you’ll be able to manage your network resources like a pro — without even opening File Explorer.

Posted by Arpita

With a background in Computer Science, she is passionate about sharing practical programming tips and tech know-how. From writing clean code to solving everyday tech problems, she breaks down complex topics into approachable guides that help others learn and grow.