# How To Determine User Active Directory Group Thru Scripting?



## meb (Nov 4, 2004)

I am currently working on a logon script to map network drives for users depending on which Active Directory group they belong to. 

Example:
User jSmith belongs to the "Accounting" group so the following drives need to be mapped for the user after logging on to a Windows 2K or XP workstation. 

//Server1/Accounting/Accounts_Receivable As the K: drive
//Server2/Accounting/Accounts_Payable As the M: drive 

My question is how to determine which Active Directory group the user belongs to while running the script just after logging on using VBScript, JScript or WSH. 

Any help or code snippets would be greatly appreciated.


----------

