Updating User properties using GraphAPI

Get Member list from Dynamic Distribution Group

Dynamic DL fetches member list from the system each time a message is sent to them, this list is fetched based on the Recipient filter, there are times when we would require to fetch to list to troubleshoot the mail delivery issue or for any other reasons.

In this post, I will demonstrate how can we fetch member list from Dynamic Distribution Group.

Getting the Members list out of the Dynamic Distribution List is simple and straightforward, we first need to get the "RecipientFilter" from the DDL, and then need to fetch the members using the "Get-Recipient" cmd with parameter "-RecipientPreviewFilter"

Below are the CMDs I run ran to fetch the details.
Note: These CMDs should be run on Microsoft Exchange Powershell to get the member List.

#Getting the Recipientfilter

$RecipientFilter = Get-DynamicDistributionGroup "DynamicDL"
$members = Get-Recipient -RecipientPreviewFilter $RecipientFilter.RecipientFilter

#Filter the required attributes.

$filterdAttributes = $members | Select DisplayName, PrimarySmtpAddress


#Export the Memberlist to CSV.

$DLMembersReport = "DynamicDLMembersReport.csv"
$filterdAttributes | Export-Csv $DLMembersReport

Comments