Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

exporting security groups names & members

Posted on 2011-03-14
13
Medium Priority
?
1,363 Views
Last Modified: 2012-05-11
hi,

how can i export all the security groups names in the AD and all its member in text or CSV file?

thanks
0
Comment
Question by:Ballack
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 5
13 Comments
 

Author Comment

by:Ballack
ID: 35127453
by the way it's windows server 2003 R2.
0
 
LVL 74

Expert Comment

by:Glen Knight
ID: 35127468
You could use CSVDE, see here for examples: http://www.computerperformance.co.uk/Logon/Logon_CSVDE_Export.htm

You could also use dsquery.

See some examples here from Chris-Dent: http://www.experts-exchange.com/Software/Server_Software/File_Servers/Active_Directory/Q_23725809.html
0
 
LVL 9

Expert Comment

by:Chev_PCN
ID: 35128101
Another option is to use ADFIND:

adfind -f "objectcategory=group" member >> C:\a\GrpMembers.txt
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Ballack
ID: 35135403
hi demazter, thanks for replying.
could you please write the exact code since iam not that expert?

here is the scinario :
i have an OU called "QIP" and our domain is called "TAS" , inside that OU there is 80 groups and i want to export each group with its members individually in one file.

thanks you
0
 

Author Comment

by:Ballack
ID: 35135405
hi Chev,
 thanks for replying but I got this message when I apply your solution: 'adfind' is not recognized as an internal or external command,

although the GrpMember.txt has been created but it is empty.

0
 
LVL 9

Expert Comment

by:Chev_PCN
ID: 35135441
Hi Ballack.
Apologies. ADFIND is not a windows native application, and you can get it here:
http://joeware.net/freetools/tools/adfind/index.htm
0
 

Author Comment

by:Ballack
ID: 35135679
sorry Chev it didn't work even when i downloaded the ADFIND.
can you please give me the exact code based on this case:
i have an OU called "QIP" and our domain is called "TAS" , inside that OU there is 80 groups and i want to export each group with its members individually in one file.

thanks
0
 
LVL 9

Accepted Solution

by:
Chev_PCN earned 2000 total points
ID: 35135713
If your domain is TAS.NET, it should be something along the lines of:
adfind -b ou=qip,dc=tas,dc=net -f "objectcategory=group" member >> C:\a\GrpMembers.txt
0
 

Author Comment

by:Ballack
ID: 35136105
thank you Chev it worked but the output little bit complicated see this example:

dn:CN=Account Operators,CN=Builtin,DC=tas,DC=com,DC=qa
>member: CN=AdminG,OU=Service Accounts,DC=tas,DC=com,DC=qa
>member: CN=XJohn Philips,OU=Service Accounts,DC=tas,DC=com,DC=qa

can it be only names of the groups and members ??


i found one command but it's working only for individual group, I have to write it everytime for each group to get their members, it is:

net group "groupname" /domain> c:report.txt
0
 
LVL 9

Expert Comment

by:Chev_PCN
ID: 35136171
You can use Excel to split the output into columns & then delete the unneeded data.
0
 

Author Comment

by:Ballack
ID: 35136228
great idea thanks man
0
 
LVL 9

Expert Comment

by:Chev_PCN
ID: 35136252
Always a pleasure!
Have a look at some of the other JoeWare tools - they are very handy.
ADFIND is quite powerful. Use ADFIND /?? to get the full manual.
0
 

Author Comment

by:Ballack
ID: 35136324
I see.

Thank you that the Manual will be very helpful.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
Let's recap what we learned from yesterday's Skyport Systems webinar.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question