Avatar of Mike Miazga
Mike Miazga
Flag for United States of America asked on

Map drive by username variable in Group Policy

I want to use group policy to map user drives specific to each user.  Such as:  username domainname\peteh needs to map to \\servername\peteh$

Is there a way to do this via group policy?
Windows Server 2008Active DirectoryWindows NetworkingIT Administration

Avatar of undefined
Last Comment
ChiIT

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
arnold

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Mike Miazga

ASKER
Variable is the username they log in as.  The mapped drive would be \\servername\username$

I tried the attached in GPP but it doesn't work.
usernamemapdrive.JPG
Mike Miazga

ASKER
Also, how do you map based on group membership?  Like if in group HR, map \\servername\hr$?
Bryant Schaper

groups are easy, goto common tab and item level targeting

you can do username there too, but I doubt you want a policy for each user.

also make your your user drive is running in their security context
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
arnold

You either create a GPO per mapped drive using the security filtering I.e GPO map drive A security filter members of groupa
GPO groupB shared drive security filter groupB

The other is to use a single logins vbscript/powershell script that has drive mapping a which includes verification of group membership as a condition.  There are examples of vbscript said, powershell and batch scripts tart conditionally map drives.

The script would either obe part of the GPO or the login script under the user's AD profile using netlogon  script.

are you mapping drive letters.

C:
D: DVD
E: he
F: management
Etc?
SOLUTION
ChiIT

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.