How To Use Net Use To Map Drives and Connect to Shares


XINSTALL BY CLICKING THE DOWNLOAD FILE
A message from our partner

Fix Windows 11 OS errors with Fortect:

  • Download Fortect and install it on your PC
  • Launch the tool and Start scanning to find broken files that are causing the problems
  • Right-click on Start Repair to fix issues affecting your computer’s security and performance
Download Now Fortect has been downloaded by 0 readers this month, rated 4.6 on TrustPilot

The net use command is a Windows utility that helps you connect to shared folders, map network drives, and manage connections through Command Prompt. This guide will teach you how to use it step by step so you can easily create, manage, and remove network drive connections.

How Do I Use Net Use Command?

Map a Network Drive

Use this to assign a shared folder to a drive letter.

  1. Press Windows + R, type cmd, then press Ctrl + Shift + Enter.
  2. Run: net use Z: \\Server\Share
  3. Enter your network credentials if prompted.
  4. Open File Explorer and check that the drive appears under This PC.

If you prefer using the graphical interface, see this detailed guide on mapping a network drive in Windows 11.

Connect With Specific Credentials

Run this if your Windows account differs from the file server credentials.

  1. Open Command Prompt as administrator.
  2. Type: net use Z: \\Server\Share /user:DOMAIN\username *
  3. Enter the password when asked.
  4. Access the mapped drive from File Explorer.

Make the Mapping Persistent

Keep your mapped drive available after restarts.

  1. Open Command Prompt.
  2. Run: net use Z: \Server\Share /user:DOMAIN\username * /persistent:yes
  3. Enter your credentials.
  4. Restart and confirm the drive is still connected.

For larger environments, you can automate this through Group Policy by following this guide to configure drive mapping with Group Policy.

List Current Connections

Quickly see all active mapped drives and network sessions.

  1. Open Command Prompt.
  2. Type:
net use
  1. Review the list of drives and their status.

Disconnect a Mapped Drive

Remove an existing network connection when you no longer need it.

  1. Open Command Prompt.
  2. Type:
net use Z: /delete
  1. To remove all connections, type:
net use * /delete

You can also delete mapped drives from File Explorer or Control Panel. For a full walkthrough, read this article on how to delete a mapped network drive in Windows.

Connect Without a Drive Letter

Access a shared folder without assigning a drive letter.

  1. Open Command Prompt.
  2. Type: net use \\Server\Share /user:DOMAIN\username *
  3. Enter the password.
  4. Use the UNC path directly in File Explorer or applications.

Common Parameters Explained

These switches help you control authentication and persistence.

  • /user:DOMAIN\username to specify a different account.
  • /persistent:yes to reconnect automatically after reboot.
  • /persistent:no for a one time connection.
  • /savecred to save login info securely.
  • /y to confirm automatically in scripts.

PowerShell Alternative

Use PowerShell commands if you prefer scripting.

  1. Map a drive:
New-PSDrive -Name Z -PSProvider FileSystem -Root \\Server\Share -Persist -Credential (Get-Credential)
  1. Remove a drive:
Remove-PSDrive -Name Z -Force
  1. List drives:
Get-PSDrive -PSProvider FileSystem

FAQs

How do I make a network drive reconnect automatically?

Add the parameter /persistent:yes so the drive restores after reboot.

Can I map a drive without typing my password every time?

Use /savecred after entering your credentials once. Windows will store them securely.

How do I remove all mapped drives at once?

Run the command net use * /delete in Command Prompt to clear all active sessions.

Does net use work on both Windows 10 and Windows 11?

Yes. The command syntax is the same on recent Windows versions.

Conclusion

The net use command gives you full control over network connections using simple text commands. It is ideal for everyday use and IT management, letting you quickly map drives, automate connections, and maintain access to shared resources.

More about the topics: command prompt

Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more

User forum

0 messages