Configure Exchange Mail Routing Settings in Active Directory
Applies to: Exchange Server 2013
Topic Last Modified: 2012-10-03
By default Microsoft Exchange Server 2013 references the IP site link objects in Active Directory to help determine the least-cost routing path. However, if you determine the Active Directory IP site link costs and traffic flow patterns aren't optimal for mail routing in Exchange, you can configure settings in Active Directory that are only used by Exchange to help optimize mail flow.
Estimated time to complete each procedure: 15 minutes
You need to be assigned permissions before you can perform this procedure or procedures. To see what permissions you need, see the "Active Directory site and site link management" entry in the Mail Flow Permissions topic.
You can only use the Shell to perform this procedure.
For information about keyboard shortcuts that may apply to the procedures in this topic, see Keyboard Shortcuts in the Exchange Admin Center.
Determine the name of the Active Directory IP site link for which you want to set an Exchange cost. A lower cost value indicates a more preferred route. You can examine the contents of the routing table logs and view the data in the ADTopologyPath ID section to view details about the calculated least cost routing path between two Active Directory sites.
To set an Exchange-specific cost on an Active Directory site link, run the following command:
Set-AdSiteLink <ADSiteLinkIdentity> -ExchangeCost <Integer | $null>
This example sets an Exchange-specific cost of 10 on the IP site link named IPSiteLinkAB.
Set-AdSiteLink IPSiteLinkAB -ExchangeCost 10
This example clears the Exchange cost from the IP site link named IPSiteLinkAB.
Set-AdSiteLink IPSiteLinkAB -ExchangeCost $null
When a hub site exists along the least cost routing path for a message, the message must be routed through the hub site. Examine the contents of the routing table logs and view the data in the ADTopologyPath ID section to verify that the selected site exists along the least cost routing path between two Active Directory sites. If this isn't the case, you need to assign Exchange-specific costs to the IP site links to make the least cost routing path go through the selected sites.
To configure an Active Directory site as a hub site, run the following command:
Set-AdSite <ADSiteIdentity> -HubSiteEnabled $true
This example configures the Active Directory site named Site A as a hub site.
Set-AdSite "Site A" -HubSiteEnabled $true
This example removes the hub site attribute from the Active Directory site named Site B.
Set-AdSite "Site B" -HubSiteEnabled $false