Link to home
Start Free TrialLog in
Avatar of bankwest
bankwestFlag for United States of America

asked on

Active Directory

Domain is Windows 2008 R2 Enterprise   SP1 server

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

Thanks
Avatar of KenMcF
KenMcF
Flag of United States of America image

since you are running 2008R2

use powershell

import-module activedirectory
get-adgroupmember GROUPNAME
ASKER CERTIFIED SOLUTION
Avatar of Mike Kline
Mike Kline
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bankwest

ASKER

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
EXCELLENT....EXACTLY what I was needing
try this

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