• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1250
  • Last Modified:

Free Tool to Generate Group Membership List

Hello,
I am looking for a free tool that would generate report of Group Membership.

Thank you very much.
0
btptech1
Asked:
btptech1
1 Solution
 
Justin OwensITIL Problem ManagerCommented:
Are you wanting something that enumerates AD and generates a complete report of all Groups, or are you wanting something that gives you a report of one group?

The easiest way to do it is if you can use the Quest AD cmdlets and use Get-QADGroupMember from here:
 http://www.quest.com/activeroles-server/arms.aspx  
   
 If you need to do it with code then  
   
 $group = [ADSI] "LDAP://cn=Accounts,ou=AllGroups,dc=starking,dc=org"  
 foreach ($member in $group.member)  
 {  
 $member  
 }  

If your group has over 1000 members, this will only grab the first 1000.  If you need more than that, try these sources:

Enumerating Groups That Contain Many Members  
 http://msdn2.microsoft.com/en-us/library/ms676302.aspx  
   
 Enumerating Members in a Large Group  
 http://msdn2.microsoft.com/en-us/library/ms180907.aspx  
   
 Searching Using Range Retrieval  
 http://msdn2.microsoft.com/en-us/library/aa367017.aspx  
   
 Attribute Range Retrieval  
 http://msdn2.microsoft.com/en-us/library/aa772308.aspx

Justin
0
 
jgpdCommented:
we are using dumpsec to generate reports it a free and very complete reporter
you can find it here
http://www.systemtools.com/somarsoft/?somarsoft.com
Regards,
Jose
0
 
Donald StewartNetwork AdministratorCommented:
0
 
bsharathCommented:
Here is a script from farhan that gets all group members to a file

* Following batch script will get all the members of groups that are specified in Groups.txt file.
* It will generate a file on C: drive root with name GroupMembers.txt having all members information.
* Copy and paste following script in notepad and save it with .BAT extension.

0
 
bsharathCommented:
Forgot the code

:: *** BATCH SCRIPT START ***
@Echo Off
SETLOCAL
IF NOT EXIST C:\groups.txt Goto ShowErr
FOR %%R IN (C:\groups.txt) Do IF %%~zR EQU 0 Goto ShowErr
IF EXIST C:\GroupMembers.txt DEL /F /Q C:\GroupMembers.txt

FOR /F "delims=#" %%g in (C:\groups.txt) Do (
      Echo Retrieving members of group: %%g
      Echo Retrieving members of group: %%g               >>C:\GroupMembers.txt
      DSQuery group -name "%%g*" | dsget group -members >>C:\GroupMembers.txt
      Echo. >>C:\GroupMembers.txt
)

Goto EndScript
:ShowErr
Echo C:\groups.txt file does not exist or file is empty!
:EndScript
ENDLOCAL
:: *** BATCH SCRIPT END ***
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now