Knowledge BaseAutodiscover changes when migrating to Office 365 in Hybrid and Cutover mode
W P Staff asked 6 years ago

We have migrated to Office 365 and changed our DNS records per O365 documentation. Exchange 2010 is still active inside the organization and when we are trying to set up new mail profiles for Office 365, autodiscover resolved to On-Prem Exchange 2010. What am i missing?

1 Answers
W P Staff answered 6 years ago

You need to make changes to AD and IIS, mainly to remove the internal AutodiscoverVirtualDirectory.
Be sure that this is the proper migration plan for you’re organization !
1. Open an elevated command prompt and back-up the IIS configuration (Just in case !):

%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, InternalUrl, Identity

Copy the Identity value to the clipboard.
3. In the Exchange Management Shell, remove the autodiscover virtual directory:

Remove-AutodiscoverVirtualDirectory -Identity “SBS01\Autodiscover (SBS Web Applications)”

When you’re identity contains a space, use the quotation marks ”
You will have to confirm by typing a “Y”.
4. Check that the autodiscover virtual directory is gone:

Get-AutodiscoverVirtualDirectory | fl Name, Server, InternalUrl, Identity

This should now return nothing.
5. Now, with Outlook running on a 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 button. The results should come from the Office 365 server.