Get-DistributionGroupMember
Applies to: Exchange Server 2010
Topic Last Modified: 2011-03-19
Use the Get-DistributionGroupMember cmdlet to find existing distribution group members.
Get-DistributionGroupMember -Identity <DistributionGroupMemberIdParameter> [-Credential <PSCredential>] [-DomainController <Fqdn>] [-IgnoreDefaultScope <SwitchParameter>] [-ReadFromDomainController <SwitchParameter>] [-ResultSize <Unlimited>]
| Parameter | Required | Type | Description |
|---|---|---|---|
|
Identity |
Required |
Microsoft.Exchange.Configuration.Tasks.DistributionGroupMemberIdParameter |
The Identity parameter specifies the identity of the distribution group. You can use one of the following values:
|
|
Credential |
Optional |
System.Management.Automation.PSCredential |
The Credential parameter specifies the user name and password to use to access Active Directory. This parameter requires the creation and passing of a credential object. This credential object is created by using the Get-Credential cmdlet. For more information, see Get-Credential. |
|
DomainController |
Optional |
Microsoft.Exchange.Data.Fqdn |
The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that retrieves data from Active Directory. |
|
IgnoreDefaultScope |
Optional |
System.Management.Automation.SwitchParameter |
The IgnoreDefaultScope parameter instructs the command to ignore the default recipient scope setting for the Exchange Management Shell session and use the entire forest as the scope. This allows the command to access Active Directory objects that aren't currently in the default scope. Using the IgnoreDefaultScope parameter introduces the following restrictions:
|
|
ReadFromDomainController |
Optional |
System.Management.Automation.SwitchParameter |
The ReadFromDomainController parameter specifies that the user information is read from a domain controller in the user's domain. If you set the recipient scope to include all recipients in the forest, and if you don't use this parameter, it's possible that the user information is read from a global catalog with outdated information. If you use this parameter, multiple reads might be necessary to get the information. Note:
By default, the recipient scope is set to the domain that hosts your Exchange servers.
|
|
ResultSize |
Optional |
Microsoft.Exchange.Data.Unlimited |
The ResultSize parameter specifies the maximum number of members returned. |
If your organization has multiple Active Directory domains, you may need to run the Set-ADServerSettings cmdlet with the ViewEntireForest parameter set to $true before running the Get-DistributionGroupMember cmdlet to view the entire forest. For more information, see "EXAMPLE 2" later in this topic.
You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you may not have access to some parameters if they're not included in the permissions assigned to you. To see what permissions you need, see the "Distribution groups" entry in the Mailbox Permissions topic.
| Error | Description |
|---|---|
|
|
|
This example returns the existing distribution group members for the distribution group Marketing USA.
Get-DistributionGroupMember -Identity "Marketing USA"
This example sets the scope of the search to the entire forest by running the Set-ADServerSettings cmdlet, and then the Get-DistributionGroupMember cmdlet searches the entire forest for the distribution group members in the Marketing Worldwide distribution group.
Set-ADServerSettings -ViewEntireForest $true Get-DistributionGroupMember -Identity "Marketing Worldwide"

Note: