Recursive Group parsing for members

I have a list of ACL dumps from a folder and I know what groups have access to specific directories.
I would like to find an example of a script (wmi or VBScript) which would give me a list of all users in those groups.
This sounds simple, if not the fact that each Domain group could contain other groups and I need to expand those to get Every User, having access to a particular directory, irregardless if it's a direct or nested membership through other groups. And there might be groups in groups in groups etc... theoretically endless, if there is a problem and two global groups are in a loop.

Does anyone have any working examples?
Or a utility that would expand the group membership for a particular group through all the nested groups into a simple text file would do good as well.
Thanks.
LVL 6
sstoukAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

star_trekCommented:
0
sstoukAuthor Commented:
From what I can see this is an example of the script which gives the Group membership where user belongs in and I need the nested users, belonging to one group - quite the opposite.
I will try to see if I can customize it, but the direct example would be better.
I am looking for:
"List all users in a group and all nested groups"
0
star_trekCommented:
Then it will be something like this:

On Error Resume Next
Set objGroup = GetObject _
  ("LDAP://cn=Scientists,ou=R&D,dc=NA,dc=fabrikam,dc=com")
objGroup.GetInfo
arrMemberOf = objGroup.GetEx("member")
WScript.Echo "Members:"
For Each strMember in arrMemberOf
    WScript.echo strMember
Next

In the above you can have something like if objectclass.strmember='group' then do the recursion
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sstoukAuthor Commented:
Works.
Thank You.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2003

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.