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.
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 –
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
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
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
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
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
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.
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.
RECOMMENDED: Click here to fix Windows errors