dynamic DL

Glenn Maxwell 13,141 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

Exchange Online
Exchange Online
A cloud-based service included in Microsoft 365, delivering scalable messaging and collaboration features with simplified management and automatic updates.
Exchange | Exchange Server | Management
Exchange | Exchange Server | Management
The administration and maintenance of Microsoft Exchange Server to ensure secure, reliable, and efficient email and collaboration services across an organization.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Vasil Michev 123.6K Reputation points MVP Volunteer Moderator
    2023-03-17T08:23:28.82+00:00

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

    Get-DynamicDistributionGroupMember DDG -ResultSize Unlimited | ? {$_.PrimarySmtpAddress -eq '******@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,601 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' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.