dynamic DL

Glenn Maxwell 8,421 Reputation points

Hi All

i have a Dynamic Distribution List in Exchange Online. it has 10000 users. i have 5 users and i want to know whether these users are members of the Dynamic Distribution List. I am exporting the Dynamic DL membership to csv file using the syntax Get-Recipient -RecipientPreviewFilter (get-dynamicdistributiongroup) and i am searching those users from the csv file. is there a direct way where i can fetch these 5 users membership

Microsoft Exchange Online
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
3,698 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
6,841 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 79,536 Reputation points MVP

    You can use the Get-DynamicDistributionGroupMember cmdlet, for example:

    Get-DynamicDistributionGroupMember DDG -ResultSize Unlimited | ? {$_.PrimarySmtpAddress -eq 'user@domain.com'}

    You can use other properties too, such as Name,Alias, EmailAddresses. No UserPricipalName though.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Xuyan Ding - MSFT 7,551 Reputation points

    Hi @Glenn Maxwell ,

    You can try to find out which dynamic distribution groups the user belongs to, and use that to determine.

    The command is as follows:

    Get-DynamicDistributionGroup -Filter * | where {
        'username' -in (Get-Recipient -RecipientPreviewFilter $_.RecipientFilter).Name

    User's image

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.