Server 2012 R2 Domain login script question

Chris Collins
Chris Collins used Ask the Experts™
on
Hi everyone -

Is there a way in Server 2012 R2 to create a login script (most likely a VB Script, I would think) that will map network drives based on whether the user is a member of a particular security group?

For example, if I have users that are members of a domain and they should have access to specific corporate data only if they are managers or executives, can I create a share, assign the members of the "Managers" and "Executives" groups permissions to that share, and then have the login script map the necessary drive letter only if the user who's logging in is a member of one of those groups?

Any info would be greatly appreciated.

Thanks much!  :-)
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Technical Expert
Commented:
Yes, you can either do this with a login script or with GPOs.

If your using a login script, do it in powershell (VBS is outdated). You can have a GPO specifically applied to those maanagers/executives that maps the drive based on their group.

Great article here for it https://blogs.technet.microsoft.com/askds/2009/01/07/using-group-policy-preferences-to-map-drives-based-on-group-membership/
SeanSystem Engineer
Commented:
You can do this with a login script just fine but why wouldn't you want to use a GPO for this? If you add a "mapped drives" GPO to the top level of your domain, under User Config -> Preferences -> Windows Settings and drive Maps you can add mapped drives.  Then do Item level targeting on each drive to apply to only the user's security groups or OUs. Done and easy.

Author

Commented:
Sorry it took me a few days to get back here. Both of these comments were very helpful and the article that you recommended was a terrific resource!

Thank you very much!

:-)
Daryl BamforthTechnical Expert

Commented:
No worries, glad it helped.

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