The Get-DistributionGroupMember command does not return all the members of distribution group if there are multiple Active Directory domains in your topology environment


Symptoms


Consider the following scenario:
  • In a Microsoft Exchange Server 2010 topology environment, there are a parent Active Directory Domain (Contoso.com) and two child domains (US.Contoso.com and Europe.Contoso.com).
  • One of the child domains (US.Contoso.com) has Exchange Server 2010 server roles installed.
  • Another child domain (Europe.Contoso.com) has Exchange Server 2010 user mailboxes.
  • The parent domain has no Exchange servers.
In this scenario, when you run the Get-DistributionGroupMember command for a distribution group, the command does not return all the members of the distribution group from the other child domain. Instead, you may receive the following error message when you run the Get-DistributionGroupMember command:
The operation could not be performed because object '<object name>' could not be found on 'Europe.Contoso.com'. + CategoryInfo          : InvalidData: (:) [Get-DistributionGroupMember], ManagementObjectNotFoundException + FullyQualifiedErrorId : 6B6149EC,Microsoft.Exchange.Management.RecipientTasks.GetDistributionGroupMember

Cause


To return the correct result, you must run the Get-DistributionGroupMember by setting the query scope to the whole forest if there are multiple Active Directory domains in your topology environment.

Resolution


To resolve this issue, follow these steps:
  1. Open Exchange Management Shell.
  2. Type the following command at the command line:
    Set-ADServerSettings -ViewEntireForest $True
    Note The Set-ADServerSettings command is a new command in Exchange Server 2010. By default, the ViewEntireForest parameter is set to False.
  3. Run the Get-DistributionGroupMember command to retrieve all the members of the distribution group.

More Information


For more information about the Get-DistributionGroupMember command, visit the following Web site:

Status


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.