Link to home
Start Free TrialLog in
Avatar of dougdog
dougdog

asked on

what powershell command do i need to export an AD security Group members to a csv

what powershell command do i need to export an AD security Group members to a csv
i just want to export the server names inside the group

or any other easy way to export group members to excel
Avatar of Neil Russell
Neil Russell
Flag of United Kingdom of Great Britain and Northern Ireland image

Example
 Get-ADGroupMember "Domain Controllers" | select name | Export-Csv c:\scripts\dcs.csv -notypeinformation

Will create a csv listing of all your Domain controllers "Domain Controllers" is the group name.
Avatar of dougdog
dougdog

ASKER

thanks  what does the notype information do
ASKER CERTIFIED SOLUTION
Avatar of Neil Russell
Neil Russell
Flag of United Kingdom of Great Britain and Northern Ireland 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
When run without that you get a line as follows....

#TYPE Selected.Microsoft.ActiveDirectory.Management.ADPrincipal
Avatar of dougdog

ASKER

perfect
If you require a GUI then try ADInfo (free but can pay for it) =
http://www.cjwdev.co.uk/Software/ADReportingTool/Info.html
Thought this might help in addition to commands.