Office 365 Migration from SBS – Outlook defaults to server

Problem:

You’ve setup all the A, CNAME, MX records etc. for your migration of email to Office 365 from SBS 2008 or 2011. Every time you try adding the account, it defaults to the existing server.

Solution:

Autodiscover is configured to pull info off the server and not Microsoft. Unfortunately, I don’t know where I get this document so I can’t credit anyone for it. Be sure that I didn’t discover this:

While editing the Service Connection Point in Active Directory Sites and Services does work, it’s probably not the “approved” way to do things.

The support manager recommended that I instead use the Exchange Management Shell to entirely remove the Autodiscover Virtual Directory using Remove-AutodiscoverVirtualDirectory. Here’s how I did that:

  1. Open an elevated command prompt and backup the IIS configuration (explained here):
    %windir%\system32\inetsrv\appcmd.exe add backup “Before Removing Autodiscover”
  2. Open an elevated Exchange Management Shell and retrieve the current Autodiscover virtual directory:
    Get-AutodiscoverVirtualDirectory | fl Name, Server, InternaUrl, Identity

Copy the Identity value to the clipboard

  1. In the Exchange Management Shell, remove the autodiscover virtual directory:
    Remove-AutodiscoverVirtualDirectory –Identity “<identity value retrieved above>”

You will have to confirm by typing a “Y”.

  1. Check that the autodiscover virtual directory is gone:
    Get-AutodiscoverVirtualDirectory | fl Name, Server, InternaUrl, Identity

This should now return nothing.

  1. Now, with Outlook running on the desktop, hold the Ctrl button, right-click on the Outlook icon in the system tray, and select Test E-mail AutoConfiguration. Enter your email address and password and click the Test The results should come back from Office 365 server.