How to export users list from AD security group in csv format?

Hello there,

I have a AD security group with 500 members. What is the command to export the list in csv format ?

Please advise.

Thanks and Regards
Who is Participating?
MaheshConnect With a Mentor ArchitectCommented:
Try below

Try below

Import-Module ActiveDirectory
Get-ADGroupMember -identity “Name of Group” | select name | Export-csv -path
Import-Module ActiveDirectory
Get-ADGroupMember -identity “Name of Group” | select name | Export-csv -path C:\Output\Groupmembers.csv -NoTypeInformation

Open in new window

Just run powershell commands with elevated command prompt

This will give you exported output of all group members
djsharmaConnect With a Mentor Technical ConsultantCommented:
Get-Process | Export-Csv c:\scripts\test.txt.

Refer the below link for proper explanation of Using the Export-Csv Cmdlet
becraigConnect With a Mentor Commented:
If you have PowerShell ad modules installed
Run the below in a PowerShell window
Import-module ac*
Get-ADUser -filter *| Select-Object lastname,firstname,description | Export-Csv c:\Allusers.csv -NoTypeInformation
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

becraigConnect With a Mentor Commented:
If no PowerShell modules this should work

csvde -f allusers.csv -r "(&(objectClass=user)(objectCategory=person)"
becraigConnect With a Mentor Commented:
I  missed the part about this being for group members :(

Good catch.
OomWallConnect With a Mentor Commented:

If you want a gui, use a LDAP browser like Softerra

You can also try powershell command Get-ADGroupMember and pipe it to a csv
e.g. Get-ADGroupMember administrators (much less painfull than csvde... and more fun)
goprasadAuthor Commented:
Please advise i have a AD group name Citrix group, where to place this in the command line?

Please advise
goprasadAuthor Commented:
Sorry I got the command working thanks very much.
Just used this command successfully.

Thanks for that.
For anyone else looking up this query without powershell you can use
dsquery group -name "groupname" | dsget group -members >c:\groupmembers.csv
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.