How to Map Network Drive With Command Prompt in Windows 10 or 11

5 Ways to Map Network Drive With Command Prompt on Windows 10 and 11-

Map Network Drive

 
This is a pretty simple job and you find an option within the ribbon of File Explorer for this. But if you are a techie user you can accomplish the same by means of command prompt in a simpler way.

You might know that after mapping a Network Drive, it becomes accessible by users in the local network. While connecting to any network drive in windows 10 it creates a shortcut. This shortcut is the shared folder which contains the drive letter, username, and password. Once you map a drive, it appears in This PC under “Network locations” so that you can use it.

Methods list

Way-1: Map a Not Protected Network Drive
Way-2: Map a Protected Network Drive
Way-3: Permanently Map to a network drive
Way-4: Remove a Mapped Network Drive
Way-5: Remove Multiple Mapped Network Drives

 

Map Network Drive With Command Prompt in Windows 11 and 10

Here is How to Map Network Drive With Command Prompt in Windows 10 or 11 –

First of all, open Command prompt with administrative rights –

Step-1: Press Windows and R keys on the keyboard.

Step-2: Type – cmd.

Step-3: Press – Ctrl+Shift+Enter.

Step-4: Click Yes on the User account control dialog.

Alternative ways to open the command prompt –

1] 12 Ways to Open Command Prompt as Administrator in Windows 10

2] 13 Ways to open Command Prompt as administrator in Windows 11

Now proceed with mapping –

Way-1: Map a Not Protected Network Drive

Let us assume that the drive letter is Z and it is not protected by a password. Then to map that network drive type the given command followed by the pressing Enter key.

net use z: \\networkShare\files
How to Map Network Drive With Command Prompt in Windows 10 or 11

Way-2: Map a Protected Network Drive

In the second scenario if the drive is protected by a password then use the following command and press the Enter key. Even in this, the name of the drive is Z.

net use z: \\networkShare\files /user:driveusername Passkey

Map Network Drive With Command Prompt in Windows 10 or 11 image 2
It is especially relevant here that you need to change the drive username and Passkey with the original username and password of the drive.

Way-3: Permanently Map to a network drive

If you restart the device after mapping to the network then you may lose the “network drive mapping”. It is so because the previous mappings were not permanent. So if you want to forevermore map the network drive then use the following command.

net use z: \\networkShare\files /P:yes

Map Network Drive With Command Prompt in Windows 10 or 11 image 3
Now here the alphabet P shows that the connection is a permanent one.

Way-4: Remove a Mapped Network Drive

Already mapped can be removed with the use of this command –

net use z: /Delete
Map Network Drive With Command Prompt in Windows 10 or 11 image 4

Way-5: Remove Multiple Mapped Network Drives

If you have more than one mapped network then you need to use the following command and press the Enter key to delete all of them together.

net use * /Delete

Map Network Drive With Command Prompt in Windows 10 or 11 image 5
As soon as you will execute the following command there will not be any mapped network flashing in the File Explorer. This will remove any number of mapped network drives.

Closing Up

Therefore, this guide helps if you want to Map Network Drive With Command Prompt in Windows 10. You can easily share the documents and do not need to carry them in a pen drive or anything after mapping.

Sharing is caring    Share Whatsapp

 
Topics:  Windows 10