GPO for drive mapping won’t work with %LogonUser% in location field

group-policymappeddrivemapping

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" /> 
<Filters>
  <FilterGroup bool="AND" not="0" name="MYDOMAIN\Domain Users" sid="S-1-5-21-1060291529-3284457842-1331950329-513" userContext="1" primaryGroup="0" localGroup="0" /> 
  </Filters>
  </Drive>

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?

Best Answer

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)