|
Something like this http://www.houseofqueues.com/CodeSamples/Members.html would
do it as well. This relies on you inputting a list of users in a text file
first and it also chases the other groups in there. If you just comment
out this line " Temp =
getGroups(strGroupName1)" you'll be able to
just get each listed users group membership in text file format without chasing
nested groups. If you really wanted to, you could just query for the users
and then for each run through, but you get the idea.
If you want to play with the format so that it gives a CSV
friendly format, you can just change the way it writes the data. Likely
you'd just want to get rid of the carriage return (VBCRLF in this
line Msg = Msg &
strGroupName & VbCrLf likely changing it to some other
character such as '%' for import.
It's a rough method , but it gives an example that should
give you what you want. DSQUERY or CSVDE would work for getting the list
of accounts you want to search against. I chose that method since I needed
to work with a subset of users vs. the entire 100K + objects in the
directory. This was the best compromise I had at the time it was
written.
To comment a line in vbscript, you use an apostrophe at the
beginning of the line to do that.
I realize as I read through this that the query syntax is
backwards. I'll fix that on the next pass :)
Should be
((objectCategory=Person)(objectClass=user)).
Al
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Abhishek Sharma Sent: Thursday, November 04, 2004 2:52 AM To: '[EMAIL PROTECTED]' Subject: [ActiveDir] Enumerating users and groups from ADS. Hello
Folks,
Greetings.
I have a deployment
of ADS using Windows 2000 SP4.
There are around
300 Security groups in the ADS. Each group has around 20-25 users, some are
unique to each group and some have membership to more the two
groups.
I have been
assigned the task to enumerate the group membership of each and every user in an
Excel - .xls or perhaps a .txt file.
I am not good at
scripting and would require the kind co-operation of script experts in this
group.
Is there anyone who
could advise me on the script which could help me.
Also, is there any
tool which could be of help to me.
Thank
you.
Kind
regards,
Abhishek.
|
- [ActiveDir] Enumerating users and groups from ADS. Mulnick, Al
- [ActiveDir] Enumerating users and groups from ADS. Justin_Leney
