If Windows is unable to map a network drive through This PC > Map Network Drive, you can use Command Prompt as an alternative.
Before You Begin
You will need the following information:
- The drive letter you want to assign, such as K:
- The server name
- The shared folder name
- A valid Windows username and password
Map the Network Drive
- Open the Windows Start menu.
- Type Command Prompt.
- Right-click Command Prompt and select Run as administrator.
- Enter the following command:
net use K: \\SERVERNAME\kc7 /user:USERNAME PASSWORD
- Press Enter.
Replace the following information with the correct details:
K:with the drive letter you want to useSERVERNAMEwith the name of the serverUSERNAMEwith the Windows usernamePASSWORDwith the Windows password
Example
net use K: \\KC-SERVER\kc7 /user:Administrator ExamplePassword123
When the drive is mapped successfully, Command Prompt should display:
The command completed successfully.
The mapped drive should now appear under This PC in File Explorer.
Keep the Drive Mapped After Restarting
To have Windows reconnect the drive after the computer restarts, add /persistent:yes to the command:
net use K: \\SERVERNAME\kc7 /user:USERNAME PASSWORD /persistent:yes
If the Drive Letter Is Already in Use
If Windows reports that the drive letter is already being used, remove the existing connection with this command:
net use K: /delete
Then run the mapping command again.
Remove the Mapped Drive
To disconnect the mapped drive later, run:
net use K: /delete
Troubleshooting
If the command does not work, confirm the following:
- The server computer is powered on.
- The workstation and server are connected to the same network.
- The server name is spelled correctly.
- The
kc7folder is shared and accessible. - The username and password are correct.
- The selected drive letter is not already assigned to another drive.
You can also test whether the workstation can communicate with the server by running:
ping SERVERNAME
If the server cannot be reached by name, try using the server's IP address:
net use K: \\192.168.1.100\kc7 /user:USERNAME PASSWORD
Security Note
Entering the password directly in the command may leave it visible on the screen or in the command history. To have Windows prompt for the password instead, use an asterisk:
net use K: \\SERVERNAME\kc7 /user:USERNAME *
Press Enter, then type the password when prompted. The password will not appear while you type it.
Help Center