✨ Quick Answer — Get Dynamic Distribution Group Members in PowerShell
- Fastest in Exchange Online (EXO v3): Run
Get-DynamicDistributionGroupMember -Identity "DynamicDL" -ResultSize Unlimitedto return resolved members directly. - Exchange Server SE / 2019 & Filter Preview: Read
RecipientFilterfromGet-DynamicDistributionGroupand pass it toGet-Recipient -RecipientPreviewFilter $DDL.RecipientFilter -ResultSize Unlimited. - Export to CSV: Pipe to
Select-Object DisplayName, PrimarySmtpAddress, RecipientTypeDetails | Export-Csv -NoTypeInformation.
A Dynamic Distribution Group (DDL) resolves its membership dynamically each time a message is sent, based on its Recipient Filter (such as Department, Company, or StateOrProvince). When troubleshooting mail delivery or auditing who receives messages sent to a Dynamic Distribution List, you need to preview and export its resolved member list.
Method 1: Get-DynamicDistributionGroupMember (Exchange Online PowerShell v3)
In Exchange Online, Get-DynamicDistributionGroupMember returns the resolved membership directly without manually extracting the filter string:
POWERSHELL
Connect-ExchangeOnline -ShowBanner:$false
# Export all resolved members of a Dynamic Distribution Group to CSV
Get-DynamicDistributionGroupMember -Identity "[email protected]" -ResultSize Unlimited |
Select-Object DisplayName, PrimarySmtpAddress, RecipientTypeDetails |
Export-Csv -Path ".\DynamicDLMembersReport.csv" -NoTypeInformation -Encoding UTF8
Method 2: Get-Recipient -RecipientPreviewFilter (Exchange Server SE / 2019 & Online)
In Exchange Server SE, 2019, or 2016 (or when testing a custom filter before saving it), extract RecipientFilter from Get-DynamicDistributionGroup and pass it to Get-Recipient -RecipientPreviewFilter:
POWERSHELL
# 1. Get the Dynamic Distribution Group object
$DDL = Get-DynamicDistributionGroup -Identity "DynamicDL"
# 2. Preview all matching recipients (respecting OU scope if configured)
$Members = Get-Recipient -RecipientPreviewFilter $DDL.RecipientFilter -ResultSize Unlimited
# 3. Filter key attributes and export to CSV
$Members |
Select-Object DisplayName, PrimarySmtpAddress, RecipientTypeDetails |
Export-Csv -Path ".\DynamicDLMembersReport.csv" -NoTypeInformation -Encoding UTF8
Tip: If the Dynamic Distribution Group is scoped to a specific Organizational Unit (RecipientContainer), pass-OrganizationalUnit $DDL.RecipientContainertoGet-Recipientso your report matches production routing.
💬 Reader Comments & Feedback
Did this runbook help, or did Microsoft change a cmdlet or UI menu? Share your feedback below.
Leave a Comment or Report an Update