When managing Exchange 2007, the recipient scope for Exchange Management Shell (EMS) and Exchange Management Console (EMC) defaults to the domain where the Exchange servers are located. Recipient scope refers to the specified portion of the Active Directory directory service hierarchy that the Exchange Management Console and the Exchange Management Shell uses for recipient management. When you set the recipient scope to a specific location within Active Directory, you can view and manage all recipients stored in that location and all of the containers under it. If your environment has multiple domains, then you may need to change the scope of recipients to find specific accounts.
Changing the recipient scope in the Exchange Management Console
- Start the Exchange Management Console.
- In the console tree, click Recipient Configuration.
- In the action pane, click Modify Recipient Scope.
In Recipient Scope, select one of the following options:
- View all recipients in forest Click this button to work with all recipients in the forest. To use a specific global catalog server, select the Global Catalog check box and then click Browse. In Select Global Catalog, select the global catalog server that you want to use. If you don’t specify a global catalog, Exchange automatically selects an available global catalog server.
- View all recipients in specified organizational unit Click this button to work with all recipients in a specific organizational unit (OU) and all OUs under it. Click Browse, and then, in Select Organizational Unit, select the OU that you want to use.
- To use a specific domain controller, select the Recipient Domain Controller check box. If you do not specify a recipient domain controller, Exchange automatically selects an available domain controller.
- Click OK.
Changing the recipient scope in the Exchange Management Shell
You must change the variable $AdminSessionADSettings.DefaultScope in EMS to change the scope. You can do this by running the following command:
$AdminSessionADSettings.DefaultScope = “<domain name>” (i.e. yourcompany.com)
You can also select a preferred Domain Controller using the following command:
$AdminSessionADSettings.PreferredDomainControllers = “<domain controller name>” (i.e. dc1.yourcompany.com)
You can set the scope to view entire domain with the following command:
$AdminSessionADSettings.ViewEntireForest = $True
- The Microsoft Management Console (MMC) saves any changes you make to a snap-in as preferences in your user profile on the administrator computer. The recipient scope setting is also saved as one of your preferences. As a result, the next time you start the Exchange Management Console on the same computer, the default setting of the recipient scope is overwritten by the scope that you last specified. However, if you use another computer or a different user account to run the Exchange Management Console, you will need to adjust the recipient scope again.
Changing the recipient scope in the Exchange Management Shell changes the set of recipients that are returned for the Get- cmdlets of the recipient. The recipient scope is accessible by using the $AdminSessionADSettings variable.
Change Recipient Scope Permanently
If you are trying to change the recipient scope of Exchange Management Shell permanently you need to modify the Exchange.ps1 file located in \Exchange\Bin\.
Locate the line “$global:AdminSessionADSettings.ViewEntireForest = $false” and change it to “$global:AdminSessionADSettings.ViewEntireForest = $true”.
For More Info: