How to Permanently Clear Previous Mailbox Info?

When you have a hybrid set up, both the local Exchange Server and the Exchange Online work as one server. In hybrid setup, you can migrate mailboxes from the local server to cloud and vice versa. However, you cannot have two mailboxes, one on the local server and one on the Exchange Online, with the same email address. If this happens, emails will be sent to the same address to two different mailboxes, depending on the direction of the email and from where it was sent. This can cause inconsistencies as the same mailbox exists in two different places. In such a case, you need to permanently clear the previous mailbox info. Let’s see how to do this to resolve the issue.

Process to Permanently Clear Previous Mailbox Info

In hybrid migration, the Exchange GUID is important when shifting a mailbox from the local Exchange Server to the Exchange Online. If, in a normal situation, a license is assigned in the cloud, it will not let you create the mailbox as the process would not have been successful yet. It will prompt that a local Exchange Sever mailbox already exists.

In such a case, you need to first extract the online mailbox so that you have a copy of the data that was mistakenly delivered to it. For this, go to the Security and Compliance Admin from the Office 365 portal and perform a search and then export it to PST file. After that, you can delete the online mailbox and remove the license.

Let’s take a look at the detailed process.

  • After opening the portal of Office 365 as a global administrator, click on the Compliance.
Open the portal of Office 365 as a global administrator and click on complience
  • Under Solutions, click on Content Search.
Under Solutions click on Content Search
  • Click on New Search.
Click on New Search
  • This will create a search process with the conditions that you specified. Once the search for items is complete, open the search query you created, click on Actions, and select Export Results.
open the search query and export result
  • Select the output options and click on Export.
Select the output options and click on Export
  • The export process will start. You can click on the Export tab to see the process.
Export tab to see the process
  • Once the data is ready for export, you will see the export key. Copy the key as you need it for downloading the PST file.
  • Click on Download results.

This will open the download process from Edge. You can specify the location where you want to export, along with the specified key. Any data that was transferred to the online mailbox can be copied. If you continue to follow the steps, any changes made on the online mailbox will be lost.

After this, you need to clean the online identity. Re-assigning the license to the user will regenerate the same situation. As mentioned, you cannot have two mailboxes with the same email address. The only option is to delete the cloud counterpart of the user and re-sync the user to have a clean synchronized user. This can be done by running the following PowerShell command in the Exchange Online.

Note: Use Exchange Online PowerShell V2 module to connect Exchange Online PowerShell.

Set-User -PermanentlyClearPreviousMailboxInfo

You must be careful when running this command as the changes are permanent. You will be prompted with the below message when you execute the command.

This operation will clear existing values from Previous home MDB and Previous Mailbox GUID of the user. After deletion, reconnecting to the previous mailbox that existed in the cloud will not be possible and any content it had will be unrecoverable PERMANENTLY. Do you want to continue?

After the successful execution of this command, the object will be removed. You can re-assign the Office 365 license and on-board the user’s mailbox with the standard procedure.

Free Download for windows

To Conclude

Apart from the above, there are various issues that may occur during the mailboxes move or the migration process. You might also face issues after the migration process is completed. For successful migration to a newer Exchange Server or to Office 365, third-party EDB to PST converter software, such as Stellar Converter for EDB can come in handy. The tool helps users to migrate mailboxes from offline EDB to PST, live Exchange Server, or Office 365. It can also export mailboxes from Hosted Exchange to PST.  

Was this article helpful?
About The Author
author image
Shelly Bhardwaj linkdin Icon

Shelly is technology expert and core knowledge of Exchange Server, Outlook.

Table of Contents


Why Choose Stellar?
  • 0M+


  • 0+

    Years of Excellence

  • 0+

    R&D Engineers

  • 0+


  • 0+


  • 0+

    Awards Received