Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Gathering a user's groups from Active Directory

Status
Not open for further replies.

InShadows

IS-IT--Management
Jul 7, 2000
36
US
I've been attempting and failing miserably at gathering all the groups that the user belongs to. I am able to get the superficial groups that the user directly belongs to by the use of:

if not blnErr then
for each objGroup in objADSI.Groups
strGroups = strGroups & "; " & objGroup.Name
next
end if

But the programming doesn't seem to post the information of recursive groups. If Hank belongs to CFO-CIO and that group is within CFO, and Hank isn't explicitly listed as a user in CFO, the program will say that Hank is only in CFO-CIO, instead of both. Is there a way to do this?
 
i am not aware of a function in adsi, wmi, vbscript or wsh that will give you a list of all groups the user, lets say, has rights to.
i dont suppose it would be too hard to recursively look back through all the groups. might take a little time though
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top