Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm struggling with a problematic drive mapping user preference where I'm trying to use the user's %LogonUser% variable to a network location (eg. \server\folder\users\%LogonUser%), but the drive mapping fails to appear after logging off and logging back in. All clients are either using Windows 2k8 server or Windows 7 Pro.

The GPO is linked, and is the last in the Linked Group Policy Objects list.

The drive mapping XML is below:

<Drive clsid="{935D1B74-9CB8-4e3c-9914-7DD559B7A417}" name="P:" status="P:" image="1" changed="2011-09-19 15:07:49" uid="{1FB4CF18-0876-4152-B24B-83FF36E5A4D5}" userContext="1" bypassErrors="1">
  <Properties action="R" thisDrive="NOCHANGE" allDrives="NOCHANGE" userName="" path="\\servername\folder\Users\%LogonUser%" label="" persistent="1" useLetter="1" letter="P" /> 
  <FilterGroup bool="AND" not="0" name="MYDOMAIN\Domain Users" sid="S-1-5-21-1060291529-3284457842-1331950329-513" userContext="1" primaryGroup="0" localGroup="0" /> 

Does anyone have any thoughts as to why this wouldn't be working? I've checked the Windows Application Event log, and I can't find anything to help me diagnose the issue. Anyone have any insight into the cause, or any suggestions as to what I should try in order to diagnose the problem?

share|improve this question
You should look in the Group Policy event log. –  joeqwerty Sep 19 '11 at 18:32
how about using %username% instead –  tony roth Sep 19 '11 at 18:44
Tried %username% - didn't work. –  CokoBWare Sep 21 '11 at 15:58
Re: Group Policy event log - I'm getting an access denied message The user 'P:' preference item in the 'NAS - Peronsal User Drive Mapping {12EB8111-1517-43D2-A5C0-9C4CF5E1C099}' Group Policy object did not apply because it failed with error code '0x80070005 Access is denied.' This error was suppressed. –  CokoBWare Sep 21 '11 at 16:01

2 Answers 2

1) Definitely use %USERNAME%

2) Do the users definitely have the right NTFS and / or Share (Remember, they're different) permissions over that folder

3) What happens if you disable "Run in users security context" (I've never had to use this for user drive mappings)

4) Finally, I always explicitly select "Show / Hide this drive" rather than leave it at "No Change" unless there's some specific reason not to. (Though I doubt that's related given your Event Log entries)

share|improve this answer

You must set the GPO to create the folder using the variable first, then you can map drive using the same variable. In the GP it's User Configuration - Preferences - Folders set it to "update" a folder using the same path as you tried to map (\server\folder\users\%username% works for me) for attributes I unchecked all boxes, then on the common tab I checked "Run in logged-on user's.." "Apply once and do not reapply" and "Item-level Targeting" I don't think you really need targeting if you don't want to use it.

After that try and map your drive using the same variable (%username%) and it should work just fine.

You can do both functions in the same GPO.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.