Powershell – Getting a list of AD group members

Although not technically coding, I do ocassionally need to run some Powershell commands at work to get something done.  I decided to share some of what I have learned here to help others that might need to do these things also.

For this one, I needed to be able to list all the Active Directory (AD) accounts that were part of a security group. Powershell makes this a relatively easy task with the Get-ADGroupMember cmdlet.

Get-import-module ActiveDirectory

Get-ADGroupMember -identity "<enter group name here>" -recursive |

Select name | Export-csv -path <enter path to file here>.csv -NoTypeInformation


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.