Avatar of georgedschneider
georgedschneider
Flag for United States of America asked on

VBScript to determine AD Group Membership

How could I write a VBSCript to dispaly the AD membership of the currently logged on user?
VB Script

Avatar of undefined
Last Comment
RobSampson

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
yehudaha

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
RobSampson

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
georgedschneider

ASKER
What do you mean by recursive?
RobSampson

If you run them both, you'll see that the first one shows only the direct groups memberships (which is usually fine if you only want to check which groups they are directly members of).  The second script will show you the direct groups they are members of (as shown in the Member Of tab), as well as the groups that contains *those* groups as well.

For example, if Joe Smith is  member of HR, it will show that, but it will also show Resources, if the HR group is a member of the Resources group.

Regards,

Rob.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes