Disable Autodiscover after Office 365 Migration

Megha Sharma Megha Sharma Updated On - 24 Oct 2019
“To answer one of the queries related to Autodiscover feature raised by a user after on-premises Exchange to Office 365 migration – this blog is drafted for all those users who are in the same situation.”

We are talking about the situation when a user has migrated from on-premises Exchange to Office 365 but has not decommissioned the source Exchange Server. The issue faced by the users is that Outlook clients are not able to detect Office 365 even after migration. They are still trying to retrieve the information from on-premises Exchange.

Why need to disable Autodiscover after Office 365 migration?

After the on-premises Exchange to Office 365 migration, the Office 365 internal Outlook users are not able to utilize the Autodiscover feature. In fact, Autodiscover points the Office 365 users to local Exchange Server as a result of which email clients try to connect to old Exchange Server. This issue might arise as internal Exchange Server is still in use of Autodiscover by ISS.

User must remove this setting of Autodiscover (internal AutodiscoverVirtualDirectory) with the old Exchange Server to cope up with this issue. Let us learn that in the next section.

Remove/Disable Autodiscover after Office 365 Migration

With Exchange Management Shell Cmdlets:

For security reasons, you should backup the ISS configuration first with the following steps.
On your old Exchange system, run the Command Prompt as administrator by right-clicking on the application exe and selecting Run as administrator option. Then run this command:

inetsrv\appcmd.exe add backup “Before Removing Autodiscover”

The backup of the ISS configuration will be taken. Next, search for the Exchange Management Shell, right-click on it and select Run as administrator option. Let it connect with the Exchange Server. Now run this command to get the information about the current Autodiscover virtual directory.

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

command to get Autodiscover virtual directory information
You will get the information about Autodiscover virtual directory like Name, Server, InternalURL, and Identity. From here, write down the exact identity value to notepad or another text file.
Next, run this cmdlet to remove this Autodiscover virtual directory in the Exchange Management Shell application.

Remove-AutodiscoverVirtualDirectory -Identity “enter copied value here”

Remove Autodiscover virtual directory
Type “Y” and press Enter, when asks for confirmation. The directory will get removed after this.

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

It will result in no output, which shows that the Autodiscover virtual directory is removed.
To confirm that Autodiscover now points to Office 365, you can run this test.

  1. Run your Outlook application and then go to the system tray on the right-most side of your system’s task bar. Here, press the Ctrl button on the keyboard and right-click the Outlook icon on system tray and select Test Email AutoConfiguration option.
  2. Test Email AutoConfiguration option

  3. Now, enter the email address, password, and click the Test option. It will start testing the configuration.

If the results are associated with your configured Office 365 server, then the test is successful.

As you have seen, there comes many issues and hardships while performing Exchange migrations manually. So, we suggest you always take the help of third-party Exchange Migration tool to perform the automated migration. Kernel Migrator for Exchange performs swift migrations between on-premises Exchange and Office 365 without any drawbacks. It can migrate data from on-premises Exchange to Office 365 along with archived mailboxes, shared mailboxes, and public folders. This advanced tool includes extra amenities for migrating Outlook rules, folder permissions, etc. Also, it performs pre-migration analysis, agent configuration, and much more. So, use this tool without any hesitance for performing all kind of advanced Exchange as well as Office 365 migrations.

Download Now