How To Fix Mapped Drive Not Reconnecting In Windows 11 (2026)
A mapped network drive that shows a red X after you sign in, with the message “Could not reconnect all network drives”, has not been reconnected by Windows.
The mapping itself is usually still saved, and Microsoft publishes a small script that reconnects it for you at sign-in.
This guide starts with the quick checks, then gives the Group Policy setting and Microsoft’s script with both ways to run it.
Quick answer: mapped drive not reconnecting
| Try | What to do |
|---|---|
| 1 | Check the other computer or NAS is on and you still have permission |
| 2 | Disconnect the drive and map it again with Reconnect at sign-in checked |
| 3 | Install pending Windows updates |
| 4 | On Pro editions, enable Always wait for the network at computer startup and logon |
| 5 | Run Microsoft’s MapDrives script at sign-in |
What does the problem look like?
Microsoft’s troubleshooting article lists three signs.
| Where you look | What you see |
|---|---|
| File Explorer | A red X on the mapped network drive |
| Command Prompt, after typing net use | The drive is listed as Unavailable |
| Notification area | “Could not reconnect all network drives” |
Microsoft wrote that article for Windows 10, version 1809, and last updated it in February 2026.
It does not name Windows 11, but MakeUseOf and TheWindowsClub list the same script and steps for Windows 11.
Why does Windows not reconnect the drive?
Microsoft’s article does not give a root cause.
Its Group Policy documentation does explain one piece of the timing.
By default a Windows PC typically does not wait for the network before it signs you in, and uses cached credentials instead.
Microsoft also notes that its startup-folder workaround only works when the PC already has a network connection at sign-in.
Check the computer that holds the folder
Microsoft’s file sharing page says a connection to a shared folder can fail because the other computer is turned off or you do not have the correct permissions.
Turn that computer or NAS on and confirm the folder is still shared before changing anything on your PC.
Our guide to sharing a folder on your network in Windows 11 shows how to check which folders a PC shares.
Disconnect the drive and map it again
- Press Windows + E to open File Explorer.
- Right-click This PC and select Show more options.
- Select Disconnect network drive, pick the drive with the red X and select OK.
- Map the drive again and check Reconnect at sign-in before you select Finish.
Microsoft says the Reconnect at sign-in box is what makes Windows connect the drive every time you sign in.
The full mapping steps are in our guide to mapping a network drive in Windows 11.
Install Windows updates
Both MakeUseOf and TheWindowsClub list updating Windows as an early step.
- Press Windows + I to open Settings.
- Select Windows Update.
- Select Check for updates, install what is offered, and restart.
Make Windows wait for the network at sign-in
This setting needs the Local Group Policy Editor.
Microsoft lists the policy for Windows 11 Pro, Enterprise and Education, not Home.
- Press Windows + R, type gpedit.msc and select OK.
- Go to Computer Configuration > Administrative Templates > System > Logon.
- Double-click Always wait for the network at computer startup and logon.
- Select Enabled, then Apply and OK.
- Restart the PC.
| Policy state | What Microsoft says happens |
|---|---|
| Enabled | The PC waits for the network to be fully initialized before users are logged on |
| Disabled or not configured | The PC typically does not wait for the network, and users log on with cached credentials |
Create Microsoft’s MapDrives.ps1 script
The script finds mapped drives marked Unavailable and maps them again, trying up to three times with 30 seconds between tries.
- Create a folder named Scripts on your system drive, for example C:\Scripts.
- Open Notepad and paste the script below.
- Save it in that folder as MapDrives.ps1, with Save as type set to All files.
Microsoft says the scripts must run as a standard user, not elevated.
Run as administrator, they map the drives where your normal account cannot see them.
Option 1: run the script from the Startup folder
- In Notepad, paste the two lines below and save the file as MapDrives.cmd.
- Copy MapDrives.cmd to %ProgramData%\Microsoft\Windows\Start Menu\Programs\StartUp.
- Sign out and sign back in.
The first line changes the PowerShell execution policy for your user account to Unrestricted, so only use it with scripts you trust.
This option needs a network connection at the moment you sign in.
Option 2: run the script with Task Scheduler
- Open Task Scheduler and select Action > Create Task.
- On the General tab, type a name such as Map Network Drives.
- Select Change User or Group, choose a local user or group, and select OK.
- On the Triggers tab, select New and set Begin the task to At log on.
- On the Actions tab, select New and keep Start a program.
- Fill in the three boxes from the table below.
- On the Conditions tab, check Start only if the following network connection is available, choose Any connection, and select OK.
- Sign out and sign back in.
| Box | Value |
|---|---|
| Program/script | Powershell.exe |
| Add arguments (optional) | -windowstyle hidden -command .\MapDrives.ps1 >> %TEMP%\StartupLog.txt 2>&1 |
| Start in (optional) | %SystemDrive%\Scripts\ |
Microsoft notes that a PowerShell window flashes briefly when the task runs.
Which option should you use?
| Your situation | Use |
|---|---|
| Desktop PC that is online as soon as you sign in | Option 1, the Startup folder |
| Laptop that joins Wi-Fi after sign-in | Option 2, the scheduled task with the network condition |
| Drive is only reachable over a VPN | A scheduled task triggered by the VPN connection |
For the VPN case, Microsoft sets the trigger to On an event, with Log set to Application, Source set to RasClient and Event ID set to 20225.
Check whether the script worked
Both options write their output to a log file.
- Press Windows + R.
- Type %TEMP%\StartupLog.txt and select OK.
A line that begins “There was an error mapping” names the share the script could not reach.
If every PC on the network has lost the drive, see our guide to fixing Network discovery is turned off.