Export Distribution lists

Roger Roger 7,181 Reputation points
2022-12-18T19:56:28+00:00

Hi All

i am using exchange 2016 hybrid environment. I want to export Dynamic Distribution lists which are in exchange online to a csv file. i.e
i want to get fetch the DisplayName, Alias,Primary SMTP Address,Recipient filter(i.e the rule or query used) to a csv file. Experts help me with the syntax.

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,190 questions
Exchange | Exchange Server | Management
{count} votes

Accepted answer
  1. Yuki Sun-MSFT 41,376 Reputation points Moderator
    2022-12-19T03:38:58.593+00:00

    Hi @Roger Roger ,

    You can connect to Exchange Online powershell and run the command below:

    Get-DynamicDistributionGroup | Select DisplayName, Alias,PrimarySmtpAddress,RecipientFilter | Export-Csv "c:\output.csv" -Notypeinformation  
    

    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.


1 additional answer

Sort by: Most helpful
  1. Amit Singh 5,306 Reputation points
    2022-12-19T10:35:38.89+00:00

    What about trying this, I have tried in my environment it can work properly.

    Get-Recipient -RecipientPreviewFilter (get-dynamicdistributiongroup ******@contoso.com).RecipientFilter -OrganizationalUnit $group.RecipientContainer | Select Displayname,alias,PrimarySmtpAddress | Export-Csv "c:\output.csv" -Notypeinformation
    
    0 comments No comments

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.