Get-DynamicDistributionGroup
Applies to: Exchange Server 2010
Topic Last Modified: 2011-03-19
Use the Get-DynamicDistributionGroup cmdlet to retrieve the settings on an existing dynamic distribution group.
Get-DynamicDistributionGroup [-Identity <DynamicGroupIdParameter>] [-Credential <PSCredential>] [-DomainController <Fqdn>] [-Filter <String>] [-IgnoreDefaultScope <SwitchParameter>] [-Organization <OrganizationIdParameter>] [-OrganizationalUnit <OrganizationalUnitIdParameter>] [-ReadFromDomainController <SwitchParameter>] [-ResultSize <Unlimited>] [-SortBy <String>]
Get-DynamicDistributionGroup [-Credential <PSCredential>] [-DomainController <Fqdn>] [-Filter <String>] [-IgnoreDefaultScope <SwitchParameter>] [-ManagedBy <GeneralRecipientIdParameter>] [-Organization <OrganizationIdParameter>] [-OrganizationalUnit <OrganizationalUnitIdParameter>] [-ReadFromDomainController <SwitchParameter>] [-ResultSize <Unlimited>] [-SortBy <String>]
Get-DynamicDistributionGroup [-Anr <String>] [-Credential <PSCredential>] [-DomainController <Fqdn>] [-Filter <String>] [-IgnoreDefaultScope <SwitchParameter>] [-Organization <OrganizationIdParameter>] [-OrganizationalUnit <OrganizationalUnitIdParameter>] [-ReadFromDomainController <SwitchParameter>] [-ResultSize <Unlimited>] [-SortBy <String>]
| Parameter | Required | Type | Description |
|---|---|---|---|
|
Anr |
Optional |
System.String |
The Anr parameter specifies a string on which to perform an ambiguous name resolution (ANR) search. You can specify a partial string and search for objects with an attribute that matches that string. The default attributes searched are:
|
|
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. The DomainController parameter isn't supported on the Edge Transport server role. The Edge Transport server role reads only from the Active Directory Lightweight Directory Services (AD LDS) instance. |
|
Filter |
Optional |
System.String |
The Filter parameter indicates the OPath filter used to filter recipients. For more information about the filterable properties, see Filterable Properties for the -Filter Parameter. |
|
Identity |
Optional |
Microsoft.Exchange.Configuration.Tasks.DynamicGroupIdParameter |
The Identity parameter specifies the dynamic distribution group. You can use one of the following values:
|
|
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:
|
|
ManagedBy |
Optional |
Microsoft.Exchange.Configuration.Tasks.GeneralRecipientIdParameter |
The ManagedBy parameter specifies the name of the mailbox user, mail-enabled group, or mail-enabled contact that appears in the Managed by tab of the Active Directory object. You can use any of the following values for this parameter:
|
|
Organization |
Optional |
Microsoft.Exchange.Configuration.Tasks.OrganizationIdParameter |
The Organization parameter is reserved for internal Microsoft use. |
|
OrganizationalUnit |
Optional |
Microsoft.Exchange.Configuration.Tasks.OrganizationalUnitIdParameter |
The OrganizationalUnit parameter limits results to a specific organizational unit (OU) container. |
|
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 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 servers that run Exchange.
|
|
ResultSize |
Optional |
Microsoft.Exchange.Data.Unlimited |
The ResultSize parameter specifies the maximum number of recipient objects returned. |
|
SortBy |
Optional |
System.String |
The SortBy parameter is used to sort the results. |
You can use distribution groups to create e-mail distribution lists and security groups to assign permissions to shared resources. Distribution groups can be used only with e-mail applications (such as Microsoft Exchange) to send e-mail messages to collections of users. You can use the Get-DynamicDistributionGroup cmdlet to retrieve the settings on an existing dynamic distribution group in Active Directory.
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 "Dynamic distribution groups" entry in the Mailbox Permissions topic.
| Error | Description |
|---|---|
|
|
|
This example retrieves the dynamic distribution group Marketing and pipelines the object to the Format-List command to display the information about the dynamic distribution group.
Get-DynamicDistributionGroup -Identity "Marketing" | Format-List
This example retrieves all dynamic distribution groups that begin with the string "Research" and pipelines the object to the Format-Table command to display the dynamic distribution group names and who they're managed by.
Get-DynamicDistributionGroup -Anr research | Format-Table Name, ManagedBy

Note: