
This will make sure the mapped drives open. Next, log out of the machine, and then re-login. This will create a log file named as StartupLog.txt in the %TEMP% folder. Open Scripts folder located at and %SystemDrive%\Scripts\ copy-paste MapDrives.ps1 in that folder.Open Startup folder located at %ProgramData%\Microsoft\Windows\Start Menu\Programs\StartUp and copy-paste MapDrives.cmd inside it.If it’s not there, the script will fail to automatically reconnect the network drivers. This works only for the devices that have network access at login. If($error.Count -eq 0 -Or $i -eq 0) Possible ways to execute the script to connect to mapped network drive 1] Create a startup item Write-Host "There was an error mapping $MappedDrive.RemotePath to $MappedDrive.LocalPath" New-SmbMapping -LocalPath $MappedDrive.LocalPath -RemotePath $MappedDrive.RemotePath -Persistent $True $MappedDrives = Get-SmbMapping |where -property Status -Value Unavailable -EQ | select LocalPath,RemotePath Keep both the scripts in the same folder. Similarly, create a script file named MapDrives.ps1 with the below content.

PowerShell -File "%SystemDrive%\Scripts\MapDrives.ps1" > "%TEMP%\StartupLog.txt" 2>&1 PowerShell -Command "Set-ExecutionPolicy -Scope CurrentUser Unrestricted" > "%TEMP%\StartupLog.txt" 2>&1 There are two scripts here. MapDrives.ps1 which are executed by MapDrives.cmd, and its done at a regular (non-elevated) command prompt.Ĭreate a script file named MapDrives.cmd, and then save it on a place where the files will be safe.
WINDOWS 10 MAPPED DRIVES NOT SHOWING WINDOWS
If Mapped network drives are not showing, connecting or working in Windows once you log on to the computer, you can try these workarounds which use scripts to make sure you are connected to them as soon as you start using your computer. One might need network access at logon, while others may need access to group policy settings. Mapped Network Drive not opening, connecting, syncing or workingīefore we go ahead with the workarounds, you should know that some workout works under certain scenarios. It may so happen that the network drive takes more than usual to connect, so we would recommend you run a few scripts when you log in to your computer.


It could be a red X that appears on the network drives or says unavailable when used from the command prompt or through a notification. There are many ways Windows notifies about its unavailability. However, if your mapped network drives don’t work in Windows 11/10, then it’s definitely an annoyance. Mapped Network Drives are very useful when you need to connect to a drive that is on a different computer, or on external storage.
