Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

On our old Windows 2003 SBS, the guy that set up the network created a login script that fired to map some drives and add a network printer. I would like to do away with that script and just use the GPO.

We're configuring a new Windows 2008 R2 server. I was able to set up a couple of mapped drives using GPO. I would like to automatically map user specific drives.

An example:

Login Username = skimmel
Mapped Drive Template = \\SERVER\users\%username%
Final Mapped Drive = \\SERVER\users\skimmel

Is there a way to do this without setting up the drive every time a new user is created?

share|improve this question

3 Answers 3

up vote 2 down vote accepted

Using the 'Update' option in the Drive Map GPO you should be able to accomplish this without much trouble.

Basically, you'll just replicate the settings from the logon script, which it looks like you have, and so now you just need to make a GPO according to these instructions. Inside the GPO window itself, where you're defining the mapped drive, there is a targeting section that will allow you to define a specific user, groups of users, or a wildcard.

As long as all the users are a member of the OU(basically, a 'container' in Active Directory that is used to organize AD) that the GPO is tied to, you should have no problem. Perhaps consider creating a new OU and moving a user or two into there to test (if you can)

share|improve this answer
    
Sorry, I'm pretty new to this. OU? Also, is %username% an actual variable that can be used? –  Sam Mar 21 '12 at 1:37
    
You will probably not be able to use %username% in GPO drive mapping, if you need it you should stick to good old logon scripts (at least I never managed to do it, apparently %username% is still not initialized at the moment GPO is applied) –  dusan.bajic Mar 21 '12 at 8:51
    
I updated my answer with a few more links to explain things like OU, and to discuss the %username% variable. –  JohnThePro Mar 21 '12 at 15:02
    
John, thanks for linking to the resources. I was able to get it to work using the %username% variable. Turned out that I had not given permission to read/write in the share folder. –  Sam Mar 21 '12 at 16:25
    
Awesome, Sam! Glad to hear it. Don't forget the little green check mark if my answer helped you. :) –  JohnThePro Mar 26 '12 at 22:10

Probably the most straight-forward way to do this is using the "Home folder" feature on the user. It is on the "Profile" tab of the user properties.

WS 2008 User Properties Profile Tab

If you want to do this for the purposes of giving them a place to save documents etc., you should look into Folder Redirection, which is an elegant solution to the problem of users saving things locally. It essentially allows you to force the Desktop and My Documents to a server folder.

share|improve this answer
    
Windows reserves special meaning for the Home folder, more than just mapping the drive. Users may notice the changes and complain... –  Chris S Mar 21 '12 at 17:39

I agree with John's answer. Here is how I deployed:

  • I put all of the user accounts that I wanted to map drives to beneath one OU (and sub OU's).
  • I deployed "Client Side Extensions" via WSUS (that's KB943729). Make sure you install this on all your XP clients, if any. It's built-in to Win7, though.
  • I used Group Policy Management Console to create a new GPO called "Drive mapper". In this GPO:
    • User config > Prefs > Windows settings > Drive maps
    • New mapped drive:
      • Action: Replace
      • Location \domain.local\dfs\share (I use DFS in this scenario)
      • Reconnect
    • In the common tab:
      • I run in logged-on user's context
      • Item-level targeting points to a security group which has the appropriate users for each share

That's about it. Sometimes it takes a couple reboots or gpupdate's to show up, though.

share|improve this answer
    
How do you get each user to point to their own folder inside of share? –  tomjedrz Mar 23 '12 at 18:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.