How to map network drive assigning letter automatically on Windows 10

You can map network drives assigning drive letters automatically to avoid conflicts on Windows 10, and in this guide, you'll learn how to do it.

Assign drive letter to map network drive automatically

On Windows 10, you can use the “net use” command to quickly map a network drive to access files on a shared folder located on a server or another computer in the network. The only caveat is that you usually have to specify a driver letter to make the drive available in File Explorer. However, if the letter is already in use, the drive will not connect. 

If you want to avoid mapping problems, you can use a specific option in the command that will assign a drive letter automatically.

In this guide, you will learn the steps to use Command Prompt to map a network drive without specifying a drive letter.

Map network drive assigning letter automatically on Windows 10

To map a network drive on Windows 10 assigning a drive letter automatically, use the following steps:

  1. Open Start on Windows 10.

  2. Search for Command Prompt and right-click the top result.

    Quick note: If you run the command as an administrator, the drive may not mount correctly, and it won’t appear in File Explorer. As a result, make sure to run the command as a standard user.
  3. Type the following command to map the network drive using the next available drive letter and press Enter:

    net use * \\DEVICE-NAME-OR-IP\SHARED-FOLDER

    In the command, the (*) is the option that allows the system to assign any drive letter that is not already in use. Remember to replace DEVICE-NAME-OR-IP and SHARED-FOLDER for the name of the computer name or IP address of the device hosting the shared folder and the name of the shared.

    For example, this command maps the ShareOne folder to the computer:

    net use * \\vm-beta\ShareOne

    Net Use map drive with automatic letter
    Net Use map drive with an automatic letter
  4. (Optional) Type the following command to map the network drive using the next available drive letter providing sign-in credentials and press Enter:

    net use * \\DEVICE-NAME-OR-IP\SHARED-FOLDER PASSWORD /user:USERNAME /persistent:yes

    In the command, the (*) is the option that allows the system to assign any drive letter that is not already in use. Remember to replace DEVICE-NAME-OR-IP and SHARED-FOLDER for the name of the computer name or IP address of the device hosting the shared folder and the name of the shared. The PASSWORD and USERNAME have to be replaced with the credentials to authenticate with the remote device. The “persistent” option allows the folder to stay mapped after reboot.

    For example, this command maps the ShareOne folder providing the user credentials and makes the mapping persistent:

    net use * \\vm-beta\ShareOne password /user:admin /persistent:yes

    Net Use map drive with credentials and automatic letter
    Net Use map drive with credentials and automatic letter

Once you complete the steps, the network drive will map with the next available drive letter automatically, and the command will let you know the letter the new map is using.

Using the net use command, you can also disconnect, make mapped network drives persistent, connect using different credentials, and a lot more. Here you can learn more about how to use the map command on Windows 10.

This guide focuses on Windows 10, but you can use the same command on Windows 8.1, Windows 7, and previous versions.