In this article, we will discuss how to map a network drive successfully and easily using Windows File Explorer and command-line. You can use it any way you are easy with. This article also answers the following queries:
How to map a network drive in Windows 10How to automatically map a network drive upon computer restartHow to map a network drive for all usersHow to map a network drive using GPO, PowerShell, and File Explorer
Mapping a network drive using File Explorer
To make sure that you are connected to the network where the shared folder exists and is accessible, look at the image provided below for your reference. Now that we have ensured that the network folder is visible to which we want to assign a drive letter so that we can proceed towards mapping the network location as a drive. Step 1: Open File Explorer with the right options Open File Explorer and go to ‘This PC’ on the left top corner below the title bar in the menu bar and select the computer tab from the network section. Step 2: Open network drive creation wizard Select “Map Network Drive” and a wizard will appear. Here Select the drive letter from the available drop-down menu and you can either type in the correct address of the shared network folder by yourself or you can browse it. Press OK and keep ‘Reconnect at sign-in’ checked as this will connect the drive automatically at startup. Click Finish. Step 3: Using different user credentials If you have a different username and password for the folder you are accessing you should also keep the ‘Connect using different credentials’ checked. Once you press finish it will ask for the password and username first you need to enter the name of the network location as shown in the image below then type the username followed by ‘backslash()’ Type the password and it’s done.
Map a network drive using PowerShell
You can also do this using the PowerShell 3.0 here is the equivalent command in PowerShell for what we did in the explorer: After the ‘Name’ flag you may write the desired the drive letter you want to assign we have assigned ‘Z’ in our example The ‘Credential’ flag is equivalent to checking the ‘connect using different credentials’ option. If you skip this option you won’t get the last prompt that has been shown in the small windows asking for the username and password. The ‘Persist’ flag is equivalent to checking the ‘Reconnect at sign-in’ in the explorer. You can find your username from the settings>Accounts>Your info here the one that is hidden with the purple box is your username. Your password is the one that you use to log in the computer however it should not be the pin that windows 10 provides to make logins quicker. You can find your domain from the system properties. The name after the full computer name is what your computer will be using it as a domain name in the network.
Mapping a network drive for all users
This method will work for only one PC having multiple users. Create a batch file with the following commands in it: Here “Z” is the drive we are going to map after that it has the address of the location that I want to map “DESKTOP-FK154L3” which is my domain, pavilionhp is my username and vmware is my password. Copy the second line and paste into the cmd to see if it works Now save the text file you just created rename it to whatever you like and make its extension from “.txt” to “.bat”(more on this at the end of the article). Your final text file should like the one shown in the image above. C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartU Paste the above-mentioned address in the address bar of My computer and paste the newly created bat file into it. You may face issues browsing the directory directly as it is a hidden directory so you should stick with copy-pasting the address into the address bar. That’s it now every time the PC starts, it will make the mapping of this remote directory on to this computer for all the users that login to it. In the end, you can use either of the methods both works flawlessly given that you don’t mess up the credentials and give the right path. You can use the one with which you are comfortable with. Mapping a network folder does give us a handy shortcut as explained above however you should at least notify your IT department of the mapped folder if you are using this feature in an organization though there aren’t any issues that a typical home user will face using this functionality. This feature is most useful when you have configured a network drive with your router so you can map it as a drive in other computers saving others through the difficulty of understanding the complexity. There are also some 3rd party applications that give the same facility but it is a total no brainer to use a third party app if the available options in the Windows already work well. Also see:
How to Map SharePoint as Network Drive in Windows 103 Ways to Access Network Path Using Command Line in Windows 10How To Create A Hidden Shared Folder In WindowsHow to Add Programs to Startup in Windows 11/104 Ways to Forget Saved Wifi Networks in Windows 10