Get Distribution list Members with PowerShell

- Words
2025-02-20

If you ever need to get a list of distribution list members, it is not ideal to use the 365 Admin panel. Instead, use the following PowerShell script:


 

Setup:

Install-Module ExchangeOnlineManagement -Scope CurrentUser
Connect-ExchangeOnline

Script:

Get-DistributionGroupMember -Identity "DISTRIBUTION_LIST_NAME" | Select Name, PrimarySmtpAddress | Export-Csv -Path "C:\temp\Members.csv" -NoTypeInformation

 

You will find the csv in the C:\temp\ directory.


Credit: 

Export users from distribution list : r/microsoft365


Jozef
Author