bankwest
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
Is there an "easy" way to list the groups and the members in that group
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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
ASKER
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
}
get-adgroup | Foreach {
$groupname = $_.Name
Get-adgroupmember $GroupName |
Select Samaccountname |
Export-csv C:\Temp\$GroupName.csv -notype
}
use powershell
import-module activedirectory
get-adgroupmember GROUPNAME