Mapped drive stopped working with %username%

ryank85 used Ask the Experts™
I'm trying to map a drive through group policy and create a folder for users profiles. I'm using the below but the drive isn't being mapped. If I remove the %username% the drive gets mapped.


The user I'm testing it with is an administrator and has full control permissions to the 'UserProfiles' folder.
gpresult is showing it is being pulled through.
It's using a drive letter not being used anywhere else.
It has worked in the past.
Windows Server 2008 R2 Standard

Any ideas why this could be happening?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Adam BrownSenior Systems Admin
Top Expert 2010

How are you deploying? Group Policy Preferences or some other technique?


I'm deploying it with Group Policy Preferences.
Shaun VermaakTechnical Specialist
Awarded 2017
Distinguished Expert 2018

Press F3 for list. Use this:

Open in new window

Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!


I've tried it with %LogonUser% as well but have the same issue.
Scott SilvaNetwork Administrator

Shouldn't the link need to end with a backslash too? Just tossing it out there...
Lead SaaS Infrastructure Engineer
1) Are you SURE that mapping the user's home drive via the user's Object in AS wouldn't be the simpler method?

2) Does the user have permissions to /r/w/e on "\\SERVERNAME\UserProfiles\%username%" (That is the username Folder itself) & said folder exists?

3) Are you SURE it wouldn't be easier to just create the user's home drives through their AD User Objects?

I ask because if you create the User's Home drives by putting "\\SERVERNAME\UserProfiles\%username%" into their user object right in AD, the folder is automatically created with correct permissions by active directory, and every time you copy a user it automatically provisions the user's home directory.

It's a very one and done solution.

I only use scripts or group policy to map the other drives which require having a specific set of group memberships, and those group memberships are already the same security groups granting them permission to map the drive in those cases.

I will bet you dollars to donuts you have created a whole bunch of user folders by hand, but only the administrator can reach them, not the users themselves, you need to edit each folder's ACLs (NTFS Permissions) to make sure each user is associated with each folder correctly)

Oh, or, you COULD just use the user's Home Drive setting in their User object in AD which takes care of all of that for you.   Just saying...  USE IT. :) ;)  :)


Thanks Ben, using the home drive was exactly what I needed to do.
Ben Personick (Previously QCubed)Lead SaaS Infrastructure Engineer

Hey ryank85, glad to help!  Sometimes its the simplest thing right?  :)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial