KB

Map Drives According to Group Membership

  1. Download Windows Server 2003 Resource Kit
  2. Copy the ifmember.exe file to the netlogon share
  3. Add the following to the logon script:
:: *** Map according to group membership:
:: *** Note that ifmember returns errorlevel 1 if the user *is* group member!
ifmember.exe YourDomain\Department1Group
if not errorlevel 1 goto EndDepartment1Group
net use X: \\FileServer\Department1Share
con2prt.exe /c \\PrintServer\Department1Printer
:EndDepartment1Group

ifmember.exe YourDomain\Department2Group
if not errorlevel 1 goto EndDepartment2Group
net use X: \\FileServer\Department2Share
con2prt.exe /c \\PrintServer\Department2Printer
:EndDepartment2Group
 If you're using a Group Policy startup script, you'll have to reference %logonserver%\netlogon\ifmember.exe in the script.