How to get the list of Distribution List and Mail-enabled security group members and owners

Mani 376 Reputation points
2025-03-07T16:25:48.4466667+00:00

Hello All,

Is there way to get the list of all owners and members of Distribution List and Mail-enabled security groups using powershell.

Microsoft 365 Training
Microsoft 365 Training
Microsoft 365: Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.Training: Instruction to develop new skills.
139 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Kavya 490 Reputation points
    2025-03-10T10:41:52.65+00:00

    You can run the below script to export all the distribution list members and owners (ManagedBy) to CSV file:
    https://o365reports.com/2025/03/04/export-distribution-groups-report-in-microsoft-365/

    To export all the mail-enabled security groups and their members, use the below script:
    https://github.com/admindroid-community/powershell-scripts/blob/master/Microsoft%20365%20Group%20Report/M365GroupReport.ps1

    By default, the script will list all the groups (DL, security, mail-enabled security, Microsoft 365 groups). You can filter mail enabled security groups by running the script as follows.

    ./M365GroupReport.ps1 -MailEnabledSecurity


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.