Export DLs and Unified groups

Rising Flight 3,731 Reputation points
2020-12-10T01:47:17.563+00:00

Hi All

i want to export all my distributions lists and unified groups with their display names and email addresses to csv file. experts please help me with the syntax to export them.

Microsoft Office Online Server
Microsoft Office Online Server
Microsoft on-premises server product that runs Office Online. Previously known as Office Web Apps Server.
585 questions
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,177 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,350 questions
{count} votes

Accepted answer
  1. Joyce Shen - MSFT 16,641 Reputation points
    2020-12-11T01:44:26.063+00:00

    Hi @Rising Flight

    Try using the below command to export your DLs and o365 groups with their displaynames and email addresses to CSV

    Get-DistributionGroup | Select DisplayName, PrimarySmtpAddress, EmailAddresses | Export-csv C:\test\DLs.csv -NoTypeInformation  
    Get-UnifiedGroup | Select DisplayName, PrimarySmtpAddress, EmailAddresses | Export-csv C:\test\Unifiedgroups.csv -NoTypeInformation  
    

    And the results show like below:

    47231-qa-2020-12-11-09-39-49.png
    47241-qa-2020-12-11-09-40-50.png


    If an Answer is helpful, please click "Accept Answer" and upvote it.

    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.
     

    0 comments No comments

0 additional answers

Sort by: Most helpful