dynamic DL

Glenn Maxwell 11,496 Reputation points
2023-03-16T21:21:47.6+00:00

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.
4,578 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.
7,669 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 108.1K Reputation points MVP
    2023-03-17T08:23:28.82+00:00

    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,581 Reputation points
    2023-03-17T09:35:53.92+00:00

    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.