My department is currently transitioning our servers to Server 2008R2 and we are looking into using Group Preferences to map network drives. Our users currently have a personal network drive and at least one group network drive for their department. Currently, we are using a kix script to map the drives. I have figured out how to map the group drive based on their security group, but I am having trouble figuring out how to automatically map the personal drive without having to set it up individually for each user. Currently, in the kix script, it maps the drive based on the user name (each personal drive is named the same as the user id). Basically, my question is, is there a way to have every user automatically map the drive that is named for them. Any help would be greatly appreciated.


You can specify the user's name as an environment variable in the destination path. See this Group Policy Team blog entry for specific details.

| improve this answer | |

Instead of using Group Policy Preferences to map user drives you can set up a drive per user using Active Directory. In each user's AD properties click the Profile tab. Under Home Folder select the Connect radio button and select a drive letter. For the path you can type \\server\sharename.

What's more is you can specify %USERNAME% in the sharename and it will map to a share named after the user, provided your shares match up to usernames that is. We were able to do \\servername\%USERNAME%$ for "secret" shares with $ at the end. This allows you to select multiple users in active directory and edit their properties all at once instead of going through each one individually.

| improve this answer | |
  • True; however, my preference is to do all configuration through GPO if possible. It gives you one point for configuration and troubleshooting then versus looking into logon scripts, profile settings, etc. – Doug Luxem Feb 10 '10 at 19:41
  • That makes sense, just giving options. – maik Feb 10 '10 at 19:44
  • 2
    A small nit to pick: "Secret" shares aren't. Set filesystem permissions and don't worry if users can "see" things they don't have access to. The "$" shares are hidden by the client, not by the server. Anybody w/ a sniffer or the Samba "smbclient" utility can "see" the "hidden" shares. – Evan Anderson Feb 10 '10 at 19:50
  • This is fine for personal drives but not suitable for group drives which was required by the OP. Using the profile tab also goes directly against a requirement: "how to automatically map the personal drive without having to set it up individually for each user". -1, sorry. – Maximus Minimus Feb 10 '10 at 20:21
  • @Evan: I know they aren't secret which is why I put it in quotes. Good points about missing the requirement by OP. – maik Feb 10 '10 at 20:28

Kixtart is the best way I've found to map drives via AD Group Membership within a logon script.

  • Download Kixtart at http://www.kixtart.org/
  • Unzip WKIK32.exe and Kix32.exe files within NETLOGON share as well as %systemroot% of the domain controller (C:\Windows) NOTE: Not 100% sure that both files need to be placed within the share but definitely kix32.exe
  • Create .kx file containing something like this within the NETLOGON share named map_drives.kx:

    IF INGROUP("ADSecurity Group") $map = "\server-name\path" use x: $map ENDIF

  • Add entry within the LOGON.cmd or LOGON.bat script file within the NETLOGON share to call the previous .kx file. \server_name\NETLOGON\KIX32.EXE \server_name\NETLOGON\map_drives.kx or %0..\Kix32.exe %0..\map_drives.kx (This path more scaleable since you can copy and paste it should your file be named "map_drives.kx)

Still not working? Troubleshooting steps...

  • Have login to a test account that is a member to the specified security group

  • Ensure logon script is properly configured with AD profile or via GPO

  • Map the drive manually to ensure proper rights to path

  • Ensure the user has rights to the NETLOGON share.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy