Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Active Directory

Posted on 2012-08-27
5
Medium Priority
?
451 Views
Last Modified: 2012-08-27
Domain is Windows 2008 R2 Enterprise   SP1 server

Is there an "easy" way to list the groups and the members in that group

Thanks
0
Comment
Question by:bankwest
  • 2
  • 2
5 Comments
 
LVL 27

Expert Comment

by:KenMcF
ID: 38338128
since you are running 2008R2

use powershell

import-module activedirectory
get-adgroupmember GROUPNAME
0
 
LVL 57

Accepted Solution

by:
Mike Kline earned 2000 total points
ID: 38338165
Are you looking fora  way to dump every group and members of those groups.

In addition to Ken's powershell you can use adfind (free).  If you are looking for a nice free GUI tool try adinfo

http://www.cjwdev.co.uk/Software/ADReportingTool/Info.html

You can select "All Groups" and export members.

Thanks

Mike
0
 

Author Comment

by:bankwest
ID: 38338193
I see that can give me a list, group by group.  

Is there a command to list all my groups and all the members in those groups and possibly export to a csv file

I am new to this so appreciate the help
0
 

Author Closing Comment

by:bankwest
ID: 38338241
EXCELLENT....EXACTLY what I was needing
0
 
LVL 27

Expert Comment

by:KenMcF
ID: 38338251
try this

get-adgroup | Foreach {
$groupname = $_.Name
Get-adgroupmember $GroupName |
  Select Samaccountname |
    Export-csv C:\Temp\$GroupName.csv -notype
}
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Group policies can be applied selectively to specific devices with the help of groups. Utilising this, it is possible to phase-in group policies, over a period of time, by randomly adding non-members user or computers at a set interval, to a group f…
It’s time for spooky stories and consuming way too much sugar, including the many treats we’ve whipped for you in the world of tech. Check it out!
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Suggested Courses

810 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