When mapping a network drive, the system technically only creates a “shortcut” or “pointer” that allows Windows 11 to locate the shared folder and access its contents as if it was a drive physically attached to the computer. After the mapping process is complete, the storage will appear on “This PC” under the “Network locations” section in File Explorer. If you no longer need access to the network resources, Windows 11 also provides quick ways to disconnect the network drive using the same tools. In this guide, you will learn the steps to use File Explorer, Command Prompt, and PowerShell to map a network drive on Windows 11.
Map network drive on Windows 11 using File Explorer Disconnect mapped network drive on Windows 11 using File Explorer Map network drive on Windows 11 using PowerShell Disconnect mapped network drive on Windows 11 using PowerShell Map network drive on Windows 11 with Command Prompt Disconnect mapped network drive on Windows 11 with Command Prompt
Map network drive on Windows 11 using File Explorer
To map a network drive with File Explorer on Windows 11, use these steps: Once you complete the steps, the network drive will become available in File Explorer.
If you cannot connect to the shared folder, use the IP address instead of the computer name. However, if the remote device uses a dynamic IP address configuration, it may change in the future, and you may need to reconnect again. Also, if the device providing the resources is using a Microsoft account with the passwordless option, you will need to create a local account you can use to connect. Otherwise, the mapping won’t work.
Disconnect mapped network drive on Windows 11 using File Explorer
To disconnect a network drive on Windows 11, use these steps: After you complete the steps, the network drive will no longer be available on the computer.
Map network drive on Windows 11 using PowerShell
To map a network drive with PowerShell commands, use these steps: Once you complete the steps, the shared folder will mount as a network drive on the computer, and it will appear in File Explorer. In the command, replace DRIVER-LETTER with a drive letter not already in use. Then change DEVICE-NAME-OR-IP and SHARED-FOLDER for the computer name or IP address of the computer hosting the shared folder and the name of the share. For example, this command maps the ShareFiles folder to the computer with the “Z” drive letter:
Map network drive with password on PowerShell
To map a network drive providing the account name and password, use these steps: After you complete the steps, the command will map the shared folder with your specified credentials.
In the command, replace DRIVER-LETTER with the drive letter not already in use. Then change DEVICE-NAME-OR-IP and SHARED-FOLDER for the computer name or IP address of the device hosting the shared folder and the name of the share. For example, this command maps the ShareFiles folder to the computer with the “X” drive letter:
When you try to connect using credentials, you will always get prompted to provide a password manually. If you want to avoid this step, you could store the password in an encrypted file on the computer and query that file using PowerShell. Or you can speed up the process by holding the remote host account name and password in Credential Manager and then using the same command without the -Crendtial option like this: New-PSDrive -Name “E” -Root “\vm-beta\ShareOne” -Persist -PSProvider “FileSystem” You can create a new entry in Credential Manager using this command: cmdkey /add:pcname /user:network\username /pass:password
Disconnect mapped network drive on Windows 11 using PowerShell
To disconnect and remove a mapped network drive with PowerShell on Windows 11, use these steps: Once you complete the steps, the network mapping will no longer be available on the computer. In the command, replace DRIVE-LETTER for the drive letter of the mapping. For example, this command disconnects the “X” drive:
In the command, replace DRIVER-LETTER-1 and DRIVE-LETTER-2 with the drive letters you want to disconnect. For example, this command disconnects the “E” and “F” drives:
Map network drive on Windows 11 with Command Prompt
To map a shared folder with Command Prompt on Windows 11, use these steps: Once you complete the steps, the network shared folder will map on the device, appearing in File Explorer. In the command, replace “Z” with the drive letter not already in use. Then replace DEVICE-NAME-OR-IP and SHARED-FOLDER for the computer name or IP address of the device hosting the shared folder and the name of the share. For example, this command maps the ShareFiles folder to the computer with the “Z” drive letter:
In the command, the (*) is the option that automatically assigns a random available drive letter. Then replace DEVICE-NAME-OR-IP and SHARED-FOLDER for the computer name or IP address of the device hosting the shared folder and the name of the share. For example, this command maps the ShareOne folder to the computer:
In the command, replace “Z” with the drive letter not already in use. Then change DEVICE-NAME-OR-IP and SHARED-FOLDER for the computer name or IP address of the device hosting the shared folder and the name of the share. The PASSWORD and USERNAME have to be replaced with the credentials to authenticate with the remote machine. The “persistent” option allows the folder to stay mapped after reboot. For example, this command maps the ShareFiles folder providing the user credentials and making the mapping persistent:
Disconnect mapped network drive on Windows 11 with Command Prompt
To disconnect a network drive on Windows 11 with commands, use these steps: After you complete the steps, the mapped drives will be disconnected and no longer accessible from File Explorer.
In the command, replace “Z” for the drive letter of the map you want to remove. All content on this site is provided with no warranties, express or implied. Use any information at your own risk. Always backup of your device and files before making any changes. Privacy policy info.