Export Group Member List

Modified on Tue, 30 Jun at 3:27 PM

#Parameters

$DistributionList = "fsiplandheri@foodserviceindia.com" # Group-Name or Group Email

$CSVFilePath = "C:\Temp\DL-Members.csv"


Try {

    #Connect to Exchange Online

    Connect-ExchangeOnline -ShowBanner:$False


    #Get Distribution List Members and Exports to CSV

    Get-DistributionGroupMember -Identity $DistributionList -ResultSize Unlimited | Select Name, PrimarySMTPAddress, RecipientType | Export-Csv $CSVFilePath -NoTypeInformation

}

Catch {

    write-host -f Red "Error:" $_.Exception.Message

}

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article