How to use the Net Use command in Windows

The net use command is a Command Prompt command used to connect, delete, and configure connections to shared resources, such as mapped drives and network printers.

It is one of many net commands like net send, net time, net user, net view, etc.

What is the net use command?

The Net Use command is a command line tool introduced in Windows 2000. It is now available in all subsequent versions of the Windows operating system. The Net Use command is used to manage network connections. This command can be used to map network drives, connect to shared folders, disconnect from shares, etc.

The Net Use command is quite useful because it can be used to automate many different tasks related to network management. For example, you can use the Net Use Command to connect or disconnect from shared resources, display information, and set user-specific settings.

Availability of the net use command

This command is available in Command Prompt on Windows 10 , Windows 8 , Windows 7 , Windows Vista, and Windows XP , as well as in older versions of Windows and in Windows Server operating systems.

How to use the Net Use command in Windows
net use command

Recovery Console, the offline repair utility in Windows XP, also includes the net use command, but you can't use it in this tool.

Note : The availability of certain command switches and other command syntax may vary between operating systems.

Syntax of net use command

This command uses the following general syntax:

net use [{devicename | *}] [\\computername\sharename[\volume] [{password | *}]] [/user:[domainname\]username] [/user:[dotteddomainname\]username] [/user:[username@dotteddomainname] [/home {devicename | *} [{password | *}]] [/persistent:{yes | no}] [/smartcard] [/savecred] [/delete] [/help] [/?]

Net use command options:

Options Explain
net use Just execute the net use command to display detailed information about currently mapped drives and devices.
devicename Use this option to specify the drive letter or printer port to which you want to map a network resource. For a shared network folder, specify drive letters from D: to Z: , and for a shared printer, LPT1: to LPT3: . Use * instead of specifying devicename to automatically assign the next available drive letter, starting with Z: and back, to a mapped drive.
\\ computername \ sharename This specifies the name of the computer, computername , and the shared resource, sharename , such as a shared folder or a shared printer connected to computername . If there are spaces here, remember to enclose the entire path, including the slash, in quotation marks.
volume Use this option to specify a volume when connecting to a NetWare server. Client Service for NetWare or Gateway Service for Netware must be installed.
password This is the password required to access the shared resource on computername . You can choose to enter the password while executing the net use command by typing * instead of the actual password.
/user Use this net command option to specify a username to connect to the resource. If you do not use /user , net use will attempt to connect to the network share or printer using your current username.
domain name Specify a different domain than the one you are using, assuming you are using a domain, with this option. Omit domainname if you are not on a domain or you want to use net use to use an existing domain.
username Use this option with /user to specify the username to use to connect to the shared resource.
dotteddomainname This option specifies the fully qualified domain where the username exists.
/home This net use command option maps the current user's home directory to the devicename drive letter or the next available drive letter with *.
/persistent: { yes | no } Use this option to control the persistence of connections created with the net use command. Choose yes to automatically restore created connections at the next login, or choose no to limit the connection lifetime for this session. You can shorten this switch to /p if you want.
/smartcard This switch allows the net use command to use the login information available on the smart card.
/savecred This option stores the password and user information for use the next time you connect in this session or in all future sessions when used with /persistent:yes .
/delete This net use command is used to delete a network connection. Use /delete with devicename to delete a specified connection or with * to delete all mapped drives and devices. This option can be shortened to /d .
/help Use this option, or the shorthand /h , to display detailed help information for the net use command. Using this switch is the same as using the net help command with net use: net help use .
/? The standard help switch also works with the net use command, but only shows the command syntax, without any details about the command's options.

How to use the Net Use command in Windows

Here are the steps you need to follow to use the Net Use command in Windows:

Step 1 : Go to Command Prompt and type net use .

How to use the Net Use command in Windows
Type net use into Command Prompt

Step 2 : The Net Use command will display current connections if no parameters are specified.

How to use the Net Use command in Windows
Current connections

Step 3 : If you want to see the options available with the Net Use command, you need to type net use /? or net use /help and press Enter . If you want to know more about a particular connection, you can also use the /? option. For example, for the 'Persistent' option , you need to type net use /? Persistent and press Enter.

Example of net use command

Here are some different ways you can use this command:

Temporarily mapped drive

net use * "\\server\my media" /persistent:no

In this example, the net use command is used to connect to the my media shared folder on a computer named server . The my media folder will be mapped to the highest available drive letter [*] , in this example y:, but will not persist this drive mapping every time you log in to the computer [/persistent:no] .

Permanently mapped drive

net use e: \\usrsvr002\smithmark Ue345Ii /user:pdc01\msmith2 /savecred /p:yes

Here is a slightly more complex example that you might see in a business environment.

In this net use command example, the author wants to map his e: drive to the smithmark share on usrsvr002. The author wants to connect as another existing user account [/user] with the name msmith2 stored on the pdc01 domain with the password Ue345Ii. The author does not want to map this drive manually every time the computer boots [/p:yes] , nor does he want to enter the username and password every time [/savecred] .

List all shared resources

net use

In this simple example of the net use command, you get a list of all shared resources currently in use in the logged in user account. In the example, the result in the Command Prompt displays "Z: \\server\shared folder\" because z: is the drive letter that is connected to the shared folder on the server.

The message "There are no entries in this list." will be displayed if there are not any connections currently established.

Unmap a drive

net use p: /delete

The final example of net use is to delete [/delete] the currently mapped drive, in this case, p: .

Leave a Comment

Troubleshooting Microsoft Teams Download Error on Macbook

Troubleshooting Microsoft Teams Download Error on Macbook

Facing Microsoft Teams "Download Error" on MacBook? Discover proven troubleshooting steps to resolve download failures quickly, from cache clears to reinstalls, and get back to smooth teamwork.

Troubleshooting Microsoft Teams Where is Teams Folder Error

Troubleshooting Microsoft Teams Where is Teams Folder Error

Tired of the frustrating Microsoft Teams "Where is Teams" Folder Error? Discover proven, step-by-step troubleshooting fixes to resolve it quickly and restore smooth teamwork. Latest methods included!

How to Fix Microsoft Teams JavaScript Error on Desktop App

How to Fix Microsoft Teams JavaScript Error on Desktop App

Frustrated by Microsoft Teams JavaScript Error on desktop app? Discover proven steps to fix it fast: clear cache, update, reset, and reinstall. Get back to seamless collaboration in minutes!

How to Fix Microsoft Teams Guest Login Error

How to Fix Microsoft Teams Guest Login Error

Struggling with Microsoft Teams "Guest Login" Error? Discover step-by-step fixes, from quick cache clears to admin settings, to resolve guest access issues fast and collaborate seamlessly. Updated with the latest tips!

How to Fix Microsoft Teams For PC Download Error

How to Fix Microsoft Teams For PC Download Error

Tired of the Microsoft Teams "For PC" download error blocking your work? Follow our proven, step-by-step guide to resolve it quickly and get Teams running smoothly on your PC today.

Solving Microsoft Teams Windows 7 Login Error

Solving Microsoft Teams Windows 7 Login Error

Struggling with Microsoft Teams "Windows 7" login error? Discover step-by-step fixes for this frustrating issue on Windows 10/11. Clear cache, edit registry, and more – get back to seamless collaboration today!

How to Fix Microsoft Teams Error Code 0x80070005 (2026 Guide)

How to Fix Microsoft Teams Error Code 0x80070005 (2026 Guide)

Tired of Microsoft Teams Error Code 0x80070005 blocking your meetings? Follow this 2026 guide with step-by-step fixes for access denied issues. Get Teams running smoothly in minutes!

How to Install the Microsoft Teams Add-in for Outlook 2026

How to Install the Microsoft Teams Add-in for Outlook 2026

Master the installation of the Microsoft Teams Add-in for Outlook 2026 effortlessly. Boost your productivity with seamless scheduling and meetings. Follow our proven, up-to-date steps for instant success!

How to Fix Microsoft Teams License Error 2026

How to Fix Microsoft Teams License Error 2026

Struggling with Microsoft Teams "License Error" 2026? Discover proven, step-by-step solutions to resolve it fast. Clear cache, check licenses, and get back to seamless collaboration—no IT help needed!

The Best Exercises for 50+

The Best Exercises for 50+

Whether youre in your 50s, 60s, or even 70s, its not too late to prioritize your health and put yourself first. Here are the best exercises for people 50 and older.

Solving Microsoft Teams Error Caa50024 on Windows 10/11

Solving Microsoft Teams Error Caa50024 on Windows 10/11

Struggling with Microsoft Teams Error Caa50024 on Windows 10/11? Follow our step-by-step fixes to resolve crashes and launch issues quickly. Latest proven solutions for seamless teamwork.

How to Fix Microsoft Teams Login Error AADSTS50011

How to Fix Microsoft Teams Login Error AADSTS50011

Stuck with Microsoft Teams login error AADSTS50011? Discover proven, step-by-step fixes to resolve the reply URL mismatch issue and log in seamlessly. No tech skills needed!

How to Fix Microsoft Teams Win 7 Compatibility Error

How to Fix Microsoft Teams Win 7 Compatibility Error

Tired of the frustrating Microsoft Teams "Win 7" Compatibility Error blocking your meetings? Get instant fixes with our step-by-step guide, including workarounds for older Windows versions. Resolve it now and stay connected!

Solving Microsoft Teams Error R Restart

Solving Microsoft Teams Error R Restart

Tired of the endless Microsoft Teams "Error R" restart loop? Get step-by-step fixes to solve Microsoft Teams Error R quickly. Clear cache, reset, reinstall & more for smooth collaboration. Works on Windows, Mac & web.

Solving Microsoft Teams Bị lỗi Troubleshooting Guide

Solving Microsoft Teams Bị lỗi Troubleshooting Guide

Struggling with Microsoft Teams "Bị lỗi" issues? Discover proven fixes for crashes, sign-in errors, and more in this comprehensive troubleshooting guide. Get back to seamless collaboration!