---
title: How to Use Get-DistributionGroupMember in PowerShell
meta_title: Get-DistributionGroupMember PowerShell Guide
slug: get-distributiongroupmember-powershell
published: 2026-11-27T00:00:00.000Z
updated: 2026-11-27T00:00:00.000Z
feature_image: /blog/images/get-distributiongroupmember-powershell/get-distributiongroupmember-syntax-microsoft-learn.1600.webp
feature_image_alt: Microsoft Learn documentation for the Get-DistributionGroupMember cmdlet showing its PowerShell syntax
author: James Futhey
author_slug: james
meta_description: Get-DistributionGroupMember lists who is in an Exchange distribution group. Examples to count members, export them to CSV and fix groups that come back empty.
status: published
---

## Quick answer

`Get-DistributionGroupMember` lists the members of a distribution group or mail-enabled security group in Exchange. Give it the group:

```powershell
Get-DistributionGroupMember -Identity "Marketing Reports"
```

`-Identity` is required and positional, so `Get-DistributionGroupMember "Marketing Reports"` works too.

It works in Exchange Online and in on-premises Exchange. In Exchange Online, run `Connect-ExchangeOnline` first. On-premises, open the Exchange Management Shell. See [Connect to Exchange Online PowerShell](/blog/connecting-to-powershell-to-manage-exchange-after/) if you can't connect.

## What does Get-DistributionGroupMember do?

It reads one group's member list. It doesn't change anything. `-Identity` accepts any value that identifies one group: name, alias, distinguished name, canonical DN, email address or GUID.

Which cmdlet you need depends on the kind of group:

| Group | Cmdlet |
|---|---|
| Distribution group or mail-enabled security group | `Get-DistributionGroupMember` |
| Dynamic distribution group (Exchange Online) | `Get-DynamicDistributionGroupMember` |
| Microsoft 365 Group | `Get-UnifiedGroupLinks -LinkType Members` |

To add people, see [Add-DistributionGroupMember](/blog/add-distributiongroupmember-powershell/). To create a group, see [New-DistributionGroup](/blog/new-distributiongroup-powershell/).

## Examples

| Goal | Command |
|---|---|
| Members of one group | `Get-DistributionGroupMember -Identity "Marketing Reports"` |
| Every member, past 1000 | `Get-DistributionGroupMember -Identity "All Staff" -ResultSize Unlimited` |
| Names and email addresses | `Get-DistributionGroupMember "Marketing Reports" \| Select-Object Name,PrimarySmtpAddress` |
| Count the members | `(Get-DistributionGroupMember "All Staff" -ResultSize Unlimited).Count` |
| Is one person in the group? | `Get-DistributionGroupMember "Marketing Reports" \| Where-Object PrimarySmtpAddress -eq "amyc@contoso.com"` |
| Rooms in a room list | `Get-DistributionGroupMember -Identity "Building 1 Rooms"` |
| Include soft-deleted members (Exchange Online) | `Get-DistributionGroupMember "Marketing Reports" -IncludeSoftDeletedObjects` |

## Why does it stop at 1000 members?

`-ResultSize` defaults to 1000. A large group gets cut short. Use `Unlimited`:

```powershell
Get-DistributionGroupMember -Identity "All Staff" -ResultSize Unlimited
```

Add it to every count and export, or the numbers will be wrong for big groups.

## How do I export members to CSV?

For one group, pick the columns and write the file:

```powershell
Get-DistributionGroupMember -Identity "Marketing Reports" -ResultSize Unlimited |
  Select-Object Name,PrimarySmtpAddress,RecipientType |
  Export-Csv marketing-members.csv -NoTypeInformation
```

For every group, loop over the groups and add the group name to each row:

```powershell
Get-DistributionGroup -ResultSize Unlimited | ForEach-Object {
  $group = $_
  Get-DistributionGroupMember -Identity $group.PrimarySmtpAddress -ResultSize Unlimited |
    Select-Object @{n='Group';e={$group.DisplayName}},Name,PrimarySmtpAddress,RecipientType
} | Export-Csv all-group-members.csv -NoTypeInformation
```

The loop identifies each group by `PrimarySmtpAddress`, which stays unique even if two groups share a display name. Microsoft's own example for Microsoft 365 Groups uses the same loop with `Get-UnifiedGroupLinks`.

If a member is itself a group, run the command again on that group to see who's in it.

## How do I list the rooms in a room list?

A room list is a distribution group whose members are room mailboxes, so this cmdlet lists its rooms:

```powershell
Get-DistributionGroupMember -Identity "Building 1 Rooms" | Select-Object Name,PrimarySmtpAddress
```

If a room is missing from the Outlook room finder, check that it appears here first. See [Outlook Room Finder Not Showing Rooms](/blog/outlook-room-finder-not-showing-rooms/) for the other causes.

## Which parameters work only on-premises?

| Parameter | What it does |
|---|---|
| `-DomainController` | Reads from one domain controller, by FQDN, such as `dc01.contoso.com` |
| `-IgnoreDefaultScope` | Searches the whole forest instead of the session's default recipient scope |
| `-ReadFromDomainController` | Reads from a domain controller in the user's domain instead of a global catalog |

With `-IgnoreDefaultScope`, `-Identity` accepts only a distinguished name, and you can't use `-DomainController`.

If your organization has more than one Active Directory domain, widen the scope to the whole forest first:

```powershell
Set-ADServerSettings -ViewEntireForest $true
Get-DistributionGroupMember -Identity "Marketing Worldwide"
```

`-IncludeSoftDeletedObjects` works the other way round: it exists only in Exchange Online.

## Why doesn't Get-DistributionGroupMember work?

| Symptom | Likely cause | Fix |
|---|---|---|
| The term Get-DistributionGroupMember isn't recognized | You aren't connected to Exchange | Run `Connect-ExchangeOnline`, or use the Exchange Management Shell |
| The list stops at 1000 | `-ResultSize` defaults to 1000 | Add `-ResultSize Unlimited` |
| The group can't be found | It's a dynamic distribution group or a Microsoft 365 Group | Use `Get-DynamicDistributionGroupMember` or `Get-UnifiedGroupLinks` |
| A dynamic group's members look out of date | Exchange Online updates that list every 24 hours | Check again the next day |
| `-IgnoreDefaultScope` can't find the group | Only a distinguished name is accepted with that switch | Pass the group's DN |
| A parameter isn't found | Your role doesn't include it | Ask an admin for the right Exchange role |

To run with another account, build a credential first and pass it to `-Credential`. See [Get-Credential](/blog/get-credential-powershell/).

## How do I check the result?

Count the members, then compare with what you expect:

```powershell
(Get-DistributionGroupMember -Identity "Marketing Reports" -ResultSize Unlimited).Count
Get-DistributionGroupMember -Identity "Marketing Reports" -ResultSize Unlimited | Sort-Object Name | Format-Table Name,PrimarySmtpAddress
```

## Sources

- [Get-DistributionGroupMember](https://learn.microsoft.com/en-us/powershell/module/exchangepowershell/get-distributiongroupmember) on Microsoft Learn
- [Get-DynamicDistributionGroupMember](https://learn.microsoft.com/en-us/powershell/module/exchangepowershell/get-dynamicdistributiongroupmember) on Microsoft Learn
- [Get-UnifiedGroupLinks](https://learn.microsoft.com/en-us/powershell/module/exchangepowershell/get-unifiedgrouplinks) on Microsoft Learn

Meeting Room 365 turns any iPad or Android tablet into a room display for Exchange and Microsoft 365 calendars. See the [features](/features/) or [pricing](/pricing/): $9 a room a month.
