Disable Autodiscover after Office 365 Migration

Megha Sharma
Megha Sharma | Updated On - 24 Jan 2022 |

Read time 4 min

"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.
    Test Email AutoConfiguration option
  2. 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.

Final words

In the manual migration from on-premises to Office 365 migration, several prerequites and permissions should be completed and assigned before starting the migration. After completion, you may face several hardships like disable of AutoDiscover and it is not a simple process to follow. That’s why you should use Kernel Migrator for Exchange software that takes care of complete migration tasks.

In Exchange Migration software, you can create several projects for different mailboxes and migrate them in separate batches. It will help you in maintaining permissions and features like AutoDiscover easily.

Download Now