How to remove “local autodiscover” or SCP when migrating to O365

I work in the SMB, and we migrate most of our clients to Office 365 from local exchange servers. Often we still use a local server for user and computer management and move the users from Small Business Server 2008/2011 to Server 2012R2.

The caveat of this is that you often also bring along Exchange settings embedded deeply in the Active Directory schema. When users open Outlook on their local machines it will first find the SCP in the Active Directory and does not use AutoDiscover. That means that users will be logged onto the old(Decommissioned) server. While external AutoDiscover outside of the clients network works perfectly.

There are three ways of resolving this:


  1. Remove the SCP using PowerShell
  2. Remove the SCP using ADSI Edit
  3. Disable IIS on the decomissioned server



Using PowerShell on the old server is probably the easiest method, You can run the following cmdlet in the Exchange Powershell Module.
Remember to only run this if all local exchange servers have been decommissioned.

Get-ClientAccessServer | Set-ClientAccessServer -AutoDiscoverServiceInternalUri $null

If you still have one CAS server in the network, you can run the following command instead:

$ServerName = "OLDSERVER"
Set-ClientAccessServer -identity $ServerName -AutoDiscoverServiceInternalUri $null

2.) Using ADSIEDIT
To delete the string from the active directory you can use ADSI edit to open the following path, please change the red marked parts to your current environment:
CN=ServerName,CN=Autodiscover,CN=Protocols,CN=ServerName,CN=Servers,CN=Exchange Administrative Group (FYENEBBA),CN=Administrative Groups,CN=OrganizationName,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=DomainName,DC=Suffix


The last method is a “Lazy mans” solution and advised if you do not want to make any permanent changes. You can decide to disable the IIS services on the CAS server, preventing logons, Outlook will automatically use Autodiscover when it finds it cannot log into the local server.


Happy migrating 🙂