Monday, November 01, 2010

Map Network Drive based on group membership – Server 2008

Amplify’d from www.lazynetworkadmin.com

Map Network Drive based on group membership – Server 2008




Every once in a while, Microsoft does something that makes you happy. I remember during the Windows server 2003 beta program, I entered in some feedback which in short stated, it would be nice if you didn’t have to attach a script to a group policy, but instead just have group policy do it for you. I gave the example of mapping network drives. Well I spoke and Microsoft listened. Thank you Microsoft.


With that being said, I thought I would go over doing exactly what my previous script did but this time with even less scripting.


So what did the old script do. The old script made it possible to not write any code. Simply drop 2 files into your netlogon directory, edit the csv with GroupName, DriveLetter:, servershare, and assign the vbs as a user logon script. And that’s it. I still don’t think it gets much easier than that script, but here’s how to do it the new way.


Open up Group Policy Management Console –> Navigate down to Group Policy Objects. Right click and choose “New”


Give the group policy a name


image


Once you click ok it will take you back to the Group Policy Management Console. Right click on your newly created Group Policy Object and choose “Edit…”


Navigate down to User Configuration –> Preferences –> Windows Settings –> Drive Maps.


Right Click on Drive Maps and choose New –> Mapped Drive


image 


Choose create, enter in the location, choose reconnect if you wish, give it a label and a drive letter.




So now we have the mapped network drive, now we need to apply it to only specified group members. Click on the Common tab of the New Drive Properties dialog window. Place a check box next to Item-Level targeting. Then press the Targeting…. button


Click new item and choose Security Group. This will fill in some text and give you a field to enter in the group name. In my scenario, I want my domain admins to have access to my everything drive.


image


Click Ok


Click Ok


This will bring you back to the Drive Maps page. Here it will show you what you just created.


image


Now just create each additional drive and target the other groups you want to assign a mapped network drive to.


After this, all that’s left is to assign a group policy over the OU which you want this applied to.



Now once the users log off and log back on they will be greeted when they open My Computer with their new mapped network drive.



That’s it!! Finally.. a network admin can just apply settings without being a scripting expert.




Read more at www.lazynetworkadmin.com
 

No comments: