Get List of Dynamic Distribution Group Members

There may be an occasion when we need to find out who the members of a dynamic distribution group are.

The following two commands should get us what we need, when run from the Exchange Management Shell. The only changes that need to be made to the commands are the items in red; based on the dynamic distribution group name and the location we want to create the CSV file.

$DDGMembers = Get-DynamicDistributionGroup "DDGNAME"
Get-Recipient -RecipientPreviewFilter $DDGMembers.RecipientFilter | Select Name,PrimarySmtpAddress,RecipientType | Export-Csv "C:\DDGMembers.csv" -NoTypeInformation

 

If there is nothing in the CSV file or in the $DDGMembers variable, it’s most likely because a) the dynamic distribution group doesn’t exist (or the name was mistyped); b) we are not running the command in the Exchange Management Shell; or c) we do not have the proper permissions to run the commands.

 

Reference(s):

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s