Mark Berry August 19, 2016
A few weeks ago, I upgraded from Windows 7 Ultimate to Windows 10 Pro. The most frustrating problem has been that mapped drives on my server frequently disconnect. One of my database programs relies on a mapped drive and keeps crashing. If I had File Explorer open, it loses its location:
The outages were very brief: I could immediately connect to the location again.
I was wondering if I needed to go back to Windows 7. Then I realized that other Windows 10 machines on the network were having the same problem. So something is wrong with the 2012 R2 Essentials server?
One 2010 article talked about disabling SMB2 to solve app crashes, but you’d think SMB2 would be working by now. Finally I found this article:
It turns out that if drives are mapped in group policy and the policy specifies Replace, the drive will disconnect and then reconnect every time group policy is refreshed. As of Windows 8.1, the group policy refresh happens not only at logon but periodically in the background while users are working.
The solution? Change the group policy to Update rather than Replace the drive mapping. In the Group Policy Object (GPO) where drive maps are defined, edit User Configuration > Preferences > Windows Settings > Drive Maps.
Here is the original Spiceworks thread:
There are several posts about the same issue under Windows 8.1, for example:
That one explains the background update principle and concludes with this:
WARNING: As of the Windows 8.1 Preview if you set a drive mapping to “Remove” or “Replace” it will forcefully disconnect the drive and close any open files you have to that location.
Confirming in the Event Log
For a while, I was keeping track of when the machine got disconnected from the server. Now that I know what to look for, I can see that a group policy refresh completed shortly after each disconnect. Filtering the System event log on
Source = GroupPolicy (Microsoft-Windows-GroupPolicy)
Event IDs = 1501, 1503 (user policy completed, with or without change)
Lost connection 8/2 2:42pm, group policy update finished 2:43pm.
Lost connection 8/2 4:41pm, group policy update finished 4:42pm.
Lost connection 8/3 8:33am, group policy update finished 8:34am
It looks like the group policy refresh happens about every two hours.
I did see one error on my client machine after changing the drive map policy:
Log Name: System
Event ID: 1085
Description: Windows failed to apply the Group Policy Drive Maps settings. Group Policy Drive Maps settings might have its own log file. Please click on the "More information" link.
So far that seems like a one-time occurrence so I’m going to ignore it.