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.
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
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.
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.