Exchange Online reporting

How to export distribution group members in Exchange Online

Export every distribution group's members with Exchange Online PowerShell, view 1 group's members in the Exchange admin centre, or run Altivane's Group Members report for 1 row per member.

By the Published Updated

To export distribution group members in Exchange Online, list the groups with Get-DistributionGroup, then read each group's members with Get-DistributionGroupMember. Both cmdlets return 1000 results unless told otherwise, so the script asks for all of them. The export leaves out Microsoft 365 groups and dynamic distribution groups, and a group inside a group is listed as 1 member, not expanded.

Choose the method that fits the job
MethodBest fit
PowerShellA CSV with 1 row per member of every distribution group and mail-enabled security group in 1 tenant.
Admin centreReading the members of 1 group, 1 group at a time.
AltivaneRecommended for regular membership reviews, with nested groups and outside members marked and a workbook to keep.

Before you start

Use an account in the Organization Management or Recipient Management role group, which Microsoft lists for distribution groups and recipients. Microsoft says members of View-Only Management can view the configuration of those features.

The script reads membership as Exchange holds it when it runs, so the CSV is a snapshot. A group with no members has no rows, and members that are deleted but still recoverable are left out unless you add -IncludeSoftDeletedObjects to Get-DistributionGroupMember. The examples read and export and change nothing.

Option 1

Export distribution group members with PowerShell

Install the module once, then connect, read each group's members and export 1 row per member. Any error stops the script before it writes a partial CSV.

PowerShell
# Install once, if the module is not already installed.
Install-Module ExchangeOnlineManagement -Scope CurrentUser
PowerShell
$ErrorActionPreference = 'Stop'
Connect-ExchangeOnline
try {
    $groups = Get-DistributionGroup -ResultSize Unlimited
    $report = @(foreach ($group in $groups) {
        $identity = "$($group.PrimarySmtpAddress)"
        if (-not $identity) { throw "No primary address for $($group.DisplayName)." }
        $members = Get-DistributionGroupMember -Identity $identity -ResultSize Unlimited
        foreach ($member in $members) {
            [pscustomobject]@{
                Group = $group.DisplayName
                GroupAddress = $identity
                GroupType = $group.RecipientTypeDetails
                Member = $member.Name
                MemberAddress = $member.PrimarySmtpAddress
                MemberType = $member.RecipientType
            }
        }
    })
    if ($report.Count -eq 0) {
        Write-Output 'No distribution group has any members.'
    } else {
        $report | Sort-Object Group, Member |
            Export-Csv -Path './distribution-group-members.csv' -NoTypeInformation -Encoding utf8
        Write-Output "$($report.Count) group members exported."
    }
} finally {
    Disconnect-ExchangeOnline -Confirm:$false
}

The script passes -ResultSize Unlimited to both cmdlets and makes 1 call per group, so a tenant with many groups takes a while. A group nested in another appears as 1 member, with its type in MemberType. To narrow the export, add -RecipientTypeDetails MailUniversalDistributionGroup or a -Filter to Get-DistributionGroup.

Check a single group

Reconnect with Connect-ExchangeOnline, then read 1 group's members. The export above disconnects when it finishes.

PowerShell
# Run while connected to Exchange Online. Replace the example group.
Get-DistributionGroupMember -Identity 'sales@example.com' -ResultSize Unlimited |
    Select-Object Name,PrimarySmtpAddress,RecipientType

Microsoft warns that a $null or non-existent -Identity value returns all objects, as if none was given, so check the group's name or address first.

Option 2

View distribution group members in the admin centre

  1. Open the Exchange admin centre for the correct tenant.
  2. Go to Recipients > Groups > Distribution list.
  3. Select the group by clicking anywhere in its row.
  4. Open the Members tab and read the names.
  5. Close the group's pane without choosing Save, so nothing changes.

This suits looking up 1 group, such as before removing a person from it, but not an export of every group. Microsoft also says the centre can show inconsistent results when you filter the members of a group with more than 5,000 members; use PowerShell for those groups.

Common questions

Why does my own command return only 1000 members?

Both Get-DistributionGroup and Get-DistributionGroupMember return 1000 results by default. Add -ResultSize Unlimited to each, as the export script does.

Why are Microsoft 365 groups and dynamic groups missing?

These cmdlets cover distribution groups and mail-enabled security groups. For a Microsoft 365 group, read its members with Get-UnifiedGroupLinks -LinkType Members. A dynamic distribution group has no stored list, because its membership is calculated dynamically.

How do I tell whether a member has left?

The export lists addresses, not whether the person still works there. Accounts with no recent sign-in are the first to check; see how to find inactive users in Microsoft Entra ID, then look for those people in the Member column.

Microsoft references

Technical references checked on 5 October 2026. The example scripts have been reviewed and syntax checked; they have not been run against a live tenant.

Talk to us about Altivane

Questions, or pricing? Get in touch.

Contact us