Outlook client ignores AutoDiscover Site Affinity

Symptoms:
Outlook 2007 or newer clients always connect to the Exchange 2007/2010/2013 Client Access server that was recently installed to get Autodiscover  information instead of connecting to the closest Active Directory site with Exchange 2007/2010/2013 Client Access server installed.

This happens despite the “AutoDiscoverSiteScope” appears to be properly configured:

Get-ClientAccessServer  | ft name, AutoDiscoverSiteScope
Name            AutoDiscoverSiteScope
—-            ———————
SERV-01       {SiteA, SiteB}
SERV-02       {SiteC, SiteD}

Cause:
When configuring the AutoDiscoverSiteScope option with Set-ClientAccessServer the following syntax is used:

Set-ClientAccessServer -Identity SRV-01 -AutodiscoverSiteScope “SiteA, SiteB”

However the underlying Active Directory object (e.g. CN=SRV-01,CN=Autodiscover,CN=Protocols,CN=SRV-01,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT), CN=Administrative Groups,CN=First Organization, CN=Microsoft Exchange, CN=Services,CN=Configuration, DC=contoso,DC=com) indicates the syntax of command is incorrect because “SiteA, SiteB”  is considered as the site name when examined with ADSIEdit:

Site Affinity is misconfigured
Site Affinity is misconfigured

This happens because the Set-ClientAccessServer cmdlet does not validate whether the entered site name corresponds to a real Active Directory site.

Resolution:
To configure AutodiscoverSiteScope option in case of multiple sites use the below syntax:

Set-ClientAccessServer -Identity SRV-01 -AutodiscoverSiteScope “SiteA”,” SiteB”

Use ADSIEdit to validate the Active Directory object has the sites listed properly:

Site Affinity is configured correctly
Site Affinity is configured correctly
Advertisements

homeMTA points to Active Directory object that have been deleted

Symptoms:

After uninstalling Exchange server and removing its Active Directory object  Event ID 2937 logged in Application log on an Exchange server and/or Warning “One or more Objects properties are pointing to Active Directory deleted objects” is recorded in SCOM.

Example event logged in Event log
Log Name:      Application
Source:        MSExchange ADAccess
Event ID:      2937
Task Category: Validation
Level:         Warning
Computer:      EX1-LON.adatum.com
Description:
Process powershell.exe (PID=12345). Object [CN=Doe\, John, OU=Users,OU=London, ,DC=Adatum,DC=com]. Property [HomeMTA] is set to value [adatum.com/Configuration/Deleted Objects/Microsoft MTA
DEL:aae571ff-19d3-bbcc-bf8a-eed91e496ea1], it is pointing to the Deleted Objects container in Active Directory. This property should be fixed as soon as possible.

SCOM warning:
Process mmc.exe (PID=67890). Object [CN=Doe\, John, OU=Users,OU=London, ,DC=Adatum,DC=com]. Property [HomeMTA] is set to value [adatum.com/Configuration/Deleted Objects/Microsoft MTA
DEL:aae571ff-19d3-bbcc-bf8a-eed91e496ea1], it is pointing to the Deleted Objects container in Active Directory. This property should be fixed as soon as possible.
EventSourceName: MSExchange ADAccess

Knowledge: http://go.microsoft.com/fwlink/?LinkID=67336&id=D00ED0ED-D9B5-48DF-9FF7-32F1A9CC592B

Computer: EX1-LON.adatum.com

Note: process name can be different depending on what process accessed the object

Resolution:
Generally  recommended solution in MS Article “One or more Objects properties are pointing to Active Directory deleted objects” solves the issue except if on the object in question has the msExchHomeServerName attribute point to an Exchange server which no longer exist.

In this case running Get-Mailbox <Alias> | Update-Recipient has no effect.
To resolve the issue when both homeMTA and msExchHomeServerName attribute have invalid values, run:
$MBX = Get-Mailbox -Identity ‘Doe, John’
Set-Mailbox $MBX -Database $MBX.Database -Confirm:$true -Force -Verbose

Source:
http://www.yusufozturk.info/windows-powershell/how-to-fix-incorrect-msexchhomeservername-attribute-after-removing-an-exchange-mailbox.html

Note: alert might not be cleared in SCOM up to 24 hours