I had upgraded a terminal server from Office XP to 2010 recently and users were getting pop up warnings about autodiscover.domain.com and remote.domain.com names not matching the certificate. Exchange happened to be setup with both external and internal autodiscover URLs pointing to an external domain address.
In order to resolve this issue completely, I had to change the internal URLs used by autodiscover in four places. The URLs need to be configured using the Exchange Power Shell. The commands I list basically get the value first, and then set the value. [more]
This article helped me find most of the commands: http://www.msexchange.org/articles_tutorials/exchange-server-2007/management-administration/configuring-exchange-server-2007-web-services-urls.html
Get-AutoDiscoverVirtualDirectory | fl
Set-AutoDiscoverVirtualDirectory -internalUrl “https://internalname/Autodiscover/Autodiscover.xml” -identity “<IDENTITY>”
Get-ClientAccessServer | fl
Set-ClientAccessServer -Identity "<IDENTITY>” -AutodiscoverServiceInternalURI "https://internalname/Autodiscover/Autodiscover.xml"
Up to this point, this fixed the SCP URL and allowed the Autodiscover E-mail test to return data.
I had to change the following internal URLs on these services also:
Get-WebServicesVirtualDirectory | fl
Set-WebServicesVirtualDirectory -Identity "<IDENTITY>" -InternalUrl "https://internalname/EWS/Exchange.asmx"
Get-UMVirtualDirectory | fl
Set-UMVirtualDirectory -Identity "<IDENTITY>" -InternalUrl "https://internalname/UnifiedMessaging/Service.asmx"