Server 2012 R2 Domain login script question

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!  :-)
Chris CollinsOwnerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Daryl BamforthTechnical ExpertCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SeanSystem EngineerCommented:
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.
Chris CollinsOwnerAuthor 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 ExpertCommented:
No worries, glad it helped.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.