Commands › Exchange Online

Get-DistributionGroupMember

Exchange Online ExchangeOnlineManagement Get-*

View the members of distribution groups and mail-enabled security groups.

Quick start script

# Get-DistributionGroupMember — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Run and inspect
Get-DistributionGroupMember -Identity <DistributionGroupMemberIdParameter> | Format-List

# 3. Export for evidence / drift tracking
Get-DistributionGroupMember | Export-Clixml .\DistributionGroupMember-$(Get-Date -Format yyyyMMdd).xml

Syntax

Get-DistributionGroupMember [-Identity] <DistributionGroupMemberIdParameter>
 [-Credential <PSCredential>]
 [-DomainController <Fqdn>]
 [-IgnoreDefaultScope]
 [-IncludeSoftDeletedObjects]
 [-ReadFromDomainController]
 [-ResultSize <Unlimited>]
 [<CommonParameters>]

Parameters (7)

ParameterTypeRequiredWhat it controls
-Identity DistributionGroupMemberIdParameter yes The Identity parameter specifies the distribution group or mail-enabled security group. You can use any value that uniquely identifies the group. For example:
-Credential PSCredential The Credential parameter specifies the username and password that's used to run this command. Typically, you use this parameter in scripts or when you need to provide different credentials that have the required permissions.
-DomainController Fqdn This parameter is available only in on-premises Exchange.
-IgnoreDefaultScope SwitchParameter This parameter is available only in on-premises Exchange.
-IncludeSoftDeletedObjects SwitchParameter This parameter is available only in the cloud-based service.
-ReadFromDomainController SwitchParameter This parameter is available only in on-premises Exchange.
-ResultSize Unlimited The ResultSize parameter specifies the maximum number of results to return. If you want to return all requests that match the query, use unlimited for the value of this parameter. The default value is 1000.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.