• Linkedin
  • Reddit

Summary :

can’t map network drive Windows 10

Mapping a network drive enables you to access the shared files you need. However, you may come across the error that can’t map network drive Windows 10. This post from MiniTool will show you how to fix this issue.

Network drive is also known as Network Attached Storage. It is a storage device on a local access network within a business or home, allowing the content can be shared with other devices on the same LAN and even remotely over the Internet.

So, in order to create a shared folder or allow other devices on the same LAN to access the content, you need to map the network drive.

However, when doing that, some users complain that they can’t map network drive Windows 10. So, in the following section, we will show you how to fix the error that Windows 10 can’t map network drive.

Solved – Can’t Map Network Drive Windows 10

In this part, we will show you how to fix the issue that you can’t map network drive in Windows 10. You can fix the mapped network drives problems by creating and running two scripts either using the Startup folder or running a task when the user signs into their account.

So, in the following section, we will show you how to fix the error that you can’t map network drive Windows 10.

Related article: How to Fix Network Drive Not Showing Issue.

Create the Command Prompt Script

At first, you need to create the Command Prompt script.

Now, here is the tutorial.

1. Open Notepad.

2. Copy and paste the following script.

PowerShell -Command "Set-ExecutionPolicy -Scope CurrentUser Unrestricted" >> "%TEMP%\StartupLog.txt" 2>&1

PowerShell -File "%SystemDrive%\Scripts\MapDrives.ps1" >> "%TEMP%\StartupLog.txt" 2>&1

3. Then click File, click Save as, and save the text file as MapDrives.cmd.

After that, you have successfully created the Command Prompt script.

Create the PowerShell Script

In order to fix the issue that Windows 10 can’t map network drive, you need to create the PowerShell script.

Now, here is the tutorial.

1. Open Notepad.

2. Copy and paste the following scripts in the text file.

$i=3

   while($True){

   $error.clear()

   $MappedDrives = Get-SmbMapping |where -property Status -Value Unavailable -EQ | select LocalPath,RemotePath

   foreach( $MappedDrive in $MappedDrives)

   {

       try {

           New-SmbMapping -LocalPath $MappedDrive.LocalPath -RemotePath $MappedDrive.RemotePath -Persistent $True

       } catch {

           Write-Host "There was an error mapping $MappedDrive.RemotePath to $MappedDrive.LocalPath"

       }

   }

   $i = $i - 1

   if($error.Count -eq 0 -Or $i -eq 0) {break}

   Start-Sleep -Seconds 30

}

3. Then save the file as the ps1.

After that, you can run the script folder.

Run Scripts Using Startup Folder

After creating the Command Prompt and PowerShell scripts, you can run the Scripts to fix the issue that Windows 10 can’t map network drive. You can run the scripts using the Startup folder.

Now, here is the tutorial.

1. Open File Explorer.

2. Then navigate to the following path: %ProgramData%\Microsoft\Windows\Start Menu\Programs\StartUp.

3. In the Startup folder, copy the MapDrives.cmd file.

copy the cmd file

4. Then navigate to the following path: %SystemDrive%\Scripts.

5. In the Scripts folder, copy and paste the MapDrives.ps1 file.

Once you have completed the above steps, sign in and sign back into the account and map the network drive again and check whether the issue that you can’t map network drive Windows 10 is fixed.

Final Words

To sum up, this post has shown how to fix the error that you can’t map network drive Windows 10. If you have any better solution to fix it, please share it in the comment zone.

  • Linkedin
  • Reddit

User Comments :

Post Comment