I had spent real huge amount of time in dealing with drive mapping in Group Policy preferences in last week. It’s easy as you see, but very difficult when you want to troubleshooting. So, I decided to write this post to help my blog visitors by providing as much as information I have gathered/learnt in Drive mapping related things.
As said before, things are really smooth when you configure drive mapping preference for the first time. If you start playing with it to satisfy different kind of situations, then you are caught. What I did to make my life tough is, I deleted the mapped drives after login and did a “gpupdate /force” no drives were mapped L. Again, what I did is, I re-logged into the machine and found that they are not in place still. I surprised and made relogin again, this time they mapped. Finally after applying multiple tests like this, I came to a conclusion that, I have below two problems…
- Drive mapping is not happening at every attempt
- Background processing of drive mapping is not working
The very big mistake I did to resolve above is, trying to resolve both the problems at same attempt and really mixed up the things and made myself confused. After taking a break, I followed the divide and conquer method.
Problem#1: Drive mapping not happening at every login
Initially I am not sure why the drive mapping is not happening at every login. I ran rsop and there drive mapping processing time is not updated. This made me to realize that drive mapping CSE didn’t triggered at all. Well, now I enabled GPO debug logging on my Windows 7 machine and started looking at the logs. They are clearly saying that drive mapping CSE processing skipped as there is no change in version number. Hmm, whatever it is doing is right and I have enabled “Process even if the Group Policy objects have not changed” option in “Drive maps preference extension policy processing” policy which is located at [Computer Configuration | Policies | Administrative Templates | System | Group Policy] and restarted my PC. Things started working and drive mapping is happening every time I re-login.
First problem is solved. Let’s move on to the second problem.
Problem#2: Background processing of drive mapping is not working.
After login, if I delete mapped drives and initiate a “gpupdate /force” command, my drives are not coming back. I again relied on GPO logs and realized that drive mapping CSE refresh is happening as part of background processing. I STRONGLY recommend to not to follow the description of Drive mapping CSE; it is really contradicting with its behavior. As per the policy description, drive mapping refresh should work during the background processing by default — but it is not the case. Now I went to the registry key, HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogonGPExtensions{5794DAFD-BE60-433f-88A2-1A31939AC01F} and changed the value of “NoBackgroundPolicy” to “0”. This did the trick and background refresh of drive mapping started working fine.
Hurry…I resolved both my problems and trying to figure out a new problem I observed just now. I will blog it as soon as I resolve it.
To Summarize:
How to make GPO to process Drive mapping at every login:
- Edit the GPO which is applicable to your computers and navigate to [Computer Configuration | Policies | Administrative Templates | System | Group Policy]
- Now go the properties of “Drive maps preference extension policy processing” policy and enable the option “Process even if the Group Policy objects have not changed”
- Save you GPO and reboot your machine
How to enable background processing for drive mapping CSE:
- Go to regedit and navigate to HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogonGPExtensions{5794DAFD-BE60-433f-88A2-1A31939AC01F}
- Locate “NoBackgroundPolicy” value and change it to “0” from “1”
- Now try doing a background refresh by issuing the command “gpupdate /force” and it should work
Thanks for reading the log story and happy learning,
Sitaram Pamarthi
Comments on this entry are closed.
Sooooooo awesome post, i adore some words so much and can i quote a couple of of those on my blog? I also have emailed you relating to is it possible for us to exchange our links, hope talking with you soon.
I dont see…
“Drive maps preference extension policy processing”
I am running Windows 2008 R2 domain controllers and my domain level is Windows 2008 R2 native.
Chris, Make sure that you are editing your “Domain Policies” from a computer which is running either windows 7 or windows 2008 R2 Operating system. You should be able to see this. Let me know if you face any trouble.
@Sitaram Pamarthi
I sent you an email with a screen shot. I am running RSAT from a Windows 7 64bit Pro PC that is joined to the same domain. I have full rights to everything.
I am wondering if they moved this in 2008 R2? I searched high and low yesterday to find any refrence to it.
Thanks!
-Chris
Thanks for the screen-shots.
I think I understood the problem. EPGDIT in your computer is picking the ADMX files from a central store(see this message next after to Administrative templates folder) where Group Policy Preferences.ADMX and ADML files are not available. Hence you are not able to see these GPP debug options.
Solution:
Solution here is to down and install “Administrative templates(ADMX) files for windows 2008“. After installation go to installation folder, locate “GroupPolicyPreferences.admx” file and copy to the central store where you are managing all your ADMX files. After that EDIT your GPO again and you should see them.
Hope this helps.
@Sitaram Pamarthi
That worked great thanks much! I see that option plus more.
-Chris
Does the registry setting for enabling background processing need to be pushed to all workstations?
Yes. It should be pushed to all computers on which you want to enable background processing.
does the group policy refresh in your environment every x mins/hrs?
if you change “NoBackgroundPolicy” = 0
does it disconnect the drive and reconnect when the group policy refreshes?
GD, If you have background refresh enabled for DriveMapping, it will check if drives are mapped and only will try to map them if they are not found. You can enable GPP debug logging if you want to see what exactly happening.
Is there any way where I can create a drive and give the name as %username% automatically when I create a new User?
You mean mapping a drive and naming it as %username%? Can you give some more details for clear understanding of the requirement?
Hi Sitaram,
I’m running Windows 7, and am getting the Cannot edit NoBackgroundPolicy: Error writing the value’s new contents.
I am a local admin, and even with turning UAC off, and running regedit as an administrator (I know, shouldn’t need to with UAC turned off), I am still getting the error. Seems like a registry permissions thing. Have you come across this? I’m not seeing much about it on the internet.
Thanks for your post, it’s been very insightful!
Jerame
No. I never came across this kind of thing. Just to eliminate UAC suspections, open a command prompt in elevated mode and start regedit from that window and try your modifications again. If you suspect the permissions issues, just cross verify the permissions of that regkey with a working PC. Thanks for your comments.
You have to take an ownership of GPExtension as System is the owner by default. You should be able to change them once you take ownership.
Hi,
I have been playing around with this and get this to work nicely on a Windows XP machine, where I can run gpupdate and the drives reappear in Explorer. Running this on Windows 7 and the drives don’t appear in explorer but when you run a “net use” they are shown but their status is listed as unavailable.
It has me completely bamboozled, have done numerous searching but can’t find where the issue may lie. I have even turned off UAC to see if that could be it, but doesn’t look like it. Any ideas?
UPDATE: I have now followed the instructions in http://support.microsoft.com/kb/937624 and this means that the drive will remap as OK (not unavailable), but still not show in Explorer. ?? Very puzzling.
UPDATE 2: Have discovered that by killing and restarting explorer.exe that this then shows the drives. No idea why it doesn’t automatically update.
JD, AFAIK, explorer will have some refresh interval after which it might show the drives in explorer. And like you said, the explorer restart also works — but not a viable solution.
While I was working on GPP, I explored too much about this. Looks like some Windows API has function to refresh explorer which may reload the mapped drives. You may want to continue your research in that direction to find a workaround to your problem.
Good idea on the API and a quick Google found this, which … doesn’t work http://powershell.com/cs/media/p/8322.aspx. Interesting that explorer.exe updates in XP and not 7 though.
Regarding the fix ti edit the reg key 1.Go to regedit and navigate to HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogonGPExtensions{5794DAFD-BE60-433f-88A2-1A31939AC01F}
This works fine but local admin has to take ownership first then change permission to give the hability to set the value to “0”
Now, do you have an idea to deploy this to 4000+ workstation????? Pushing the value with GPO I’m ok but what about taking Ownership prior…..???
Thanks!!!
I guess you can deploy it with group policies as GPOs processing will be done with SYSTEM account which has FULL access on the registry key that we are referring here.
Let us know if you face any trouble in doing that.
Works like a charm… Only problem and for now there’s no viable resolution is Explorer.exe does not refresh but the map shows up using Net use command. So a quick logoff login as the workarround. thanks
Deploy registry settings through GPO/Preferences/Windows Settings/Registry , it works.
Fred,
Yes, relogin will work. There are two more options available to make explorer recognize the drives without re-login.
1) Restart the explorer process — I know it is a bad option but works.
2) Implement the Explorer Refresh Script that JD mentioned in the comments section. — Looks like is has some compatibility issues with Windows 7 but can be figure out.
Hope this help..!!
Dear Sitaram,
thanks for sharing knowledge, deployment through GPO/Preferences/Windows Settings/Registry works fine, its ok, i have tested & implemented it. Further only this registry change have also solved my 1st problem (re-connect network drive after log on/log off).
One more thing required your kind attention that on Server 2k3 my log-on scripts (in *.bat format) works fine, but when I put them in server 2k8-R2/User-Properties/Profile/Logon scripts they don’t run. These *.bat files are in \sysvol\domain-name\scripts folder and are also visible in \netlogon\ & are accessable on each client and even I can run them manually.
Thanks in advance & best regards.
Breeze, are you seeing the logon scripts in RSOP output when ran from any windows 2008 server?
You can also place the NoBackgroundPolicy DWORD value under the [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Group Policy\{5794DAFD-BE60-433f-88A2-1A31939AC01F}] key and it works, overriding the other registry setting mentioned in this article.
This leaves me wondering why MS left this option out of the Drive Maps Policy Processing policy, since the other 3 options exist under this policy key as well.
Has anyone come up with a solution regarding the need to restart explorer.exe on Windows 7 to make mapped drives appear in Explorer after gpupdate or background policy refresh is performed?
Hey guys,
@ChrisSPS
I found the solution! Open the Folder Options. Select the Launch folder windows in a separate process check box, and then click OK. All mapped drives appear now in every new explorer window after ‘gpupdate’. You dont need to logoff. If you want to use ‘gpupdate /force’, answer no.
I am not sure about the background policy refresh.
best regards from germany
mourb
Nothing here worked for me.
Windows 2008
Update: Found that instead of Create, I specified Recreate under Preferences/Drive Maps and now all servers and workstations seem to map correctly. Verification will come on Monday with un-touched machines that need to update the GPO first time.
Tried the drive map – enabled all settings on this post – added in “Always wait for network” gpo setting as well as the tracing. No drives show and there are no errors in the tracing log. Extremely frustrating!!!
I’ve tried create, update and replace for the drive map settings…. can’t get it to show anything!!! both the tracing log and the event log show that settings were applied successfully… I can do a net use and have it map fine, just not in GPP.
I have an issue where the mapped drive needs the password prepopulated. That prepopulated password is the users login name. How can I prepopulate the password and confirm password with the users’ login name for the password?
Hi Sitaram
I am experiencing recently a strange issue. Suddenly (1 week ago) all my GPPs drives & printers mapping don’t work under a specific OU.
My domain is a w2k3 native, but now I had several w2k8r2 DC running correctly. If I try a “report group policy” or a “modeling group policy” for a user/workstation, if the report or the modeling runs under a w2k8 DC everything is fine, if it runs (and by default is so) under the last w2k3 DC all the GPPs fail
I try to force to inherit policies from a w2k8 DC…I install the GPP client side extension in the w2k3 DC but nothing to do… 🙁
May you help me ?
Thank you very much!
Hello..
These are time saving techniques,Thank you very much for detailed resolution.
But,After applying these fixes,I still have some issue with my drive mappings.
I have my drives mapped though GPP and applying pretty perfect. but dont have any idea what was happened suddenly after 3 weeks ,My drives disappeared.. In fact I am using VPN after since two weeks.
i am not sure where to start with,Can you please give some thoughts to check..
Thanks
VCP
Hi,
I am facing this from past few weeks. I hope the workaround you post above would fix my issue. But before I try, i wanted you to clarify that this Group Policy Edit should be done from my Domain Controller or from client PC. You must have mentioned in your post as it would be clear for all those people who is beginner like me.
Thanks waiting for your respond.
Riswan, Group Policy Preferences are part of domain policies. So, it is up to you from where you want to modify them. If you have GPMC installed on the client computer, then you can modify the domain policy from the client. Or you can do it from a domain controller as well because GPMC is installed by default when you promote it to DC. In either of these cases, you should modify the same policy where you are using the group policy preferences. Hope that is clear.