How to connect to a network UNC drive from Windows 10 and map the resource to a drive letter

  1. Open File Explorer by clicking on the folder icon in the taskbar or pressing the Windows key + E.
  2. In the left pane, click on “This PC.”
  3. Click on the “Computer” tab in the top menu and select “Map network drive.”
  4. In the “Drive” drop-down menu, select the drive letter you want to use for the network UNC drive.
  5. In the “Folder” field, enter the UNC path to the network drive you want to connect to (e.g. \server\share).
  6. If the network drive requires a username and password to connect, check the “Connect using different credentials” box and enter the necessary information.
  7. Click “Finish” to connect to the network UNC drive and map it to the selected drive letter.

The mapped network drive should now appear in the left pane of File Explorer and can be accessed like any other drive on your computer.

Note: For mapping network drive to persist after reboot, you can check the “Reconnect at sign-in” option before clicking on Finish.

And that’s it! You should now be able to access the network UNC drive from Windows 10 using the mapped drive letter.

Here is a one-click script for connecting to a network UNC drive and mapping it to a drive letter in Windows 10:

@echo off

rem Variables
set username=””
set password=””
set server=””
set share=””
set drive_letter=Z:

rem Map network drive
net use %drive_letter% \\%server%\%share% /user:%username% %password%

You will need to edit the script and replace the values of the variables username, password, server, share, and drive_letter with the appropriate values for your network UNC drive and the desired drive letter.

You can save this script as a file with a .bat extension and double click to run it.

This script uses the net use command to connect to the network drive and map it to the specified drive letter. After running the script, the network drive should be mapped and accessible in File Explorer.

Please note that this script is a basic example and may not work in all cases. It is always recommended to test the script in a safe environment before using it in production.