Uninstall cannot continue. Database 'DEVEXCH170-01-CEO and Councillors': This mailbox database contains one or more mailboxes, mailbox plans, archive mailboxes, or arbitration mailboxes. To get a list of all mailboxes in this database, run the command Get-Mailbox -Database
This error is normal when you have a database that has a mailbox, archive mailbox or arbitration mailbox. It can also happen if it is associated with a Mailbox Plan (in a multi tenant environment).
In my case, there was no mailbox in the database!
Also the verbose command is meant to show you which mailbox resides in the database in the event one is present as per Exchange MVP Tony Redmond's post here:
In this environment, the mailbox causing the issue was not displayed in the verbose output!
After much troubleshooting I decided to export the entire domain partition to a text file and search for the database name.
This was done with the following command:
dsquery * domainroot -attr * -limit 0
After searching the text file for the database name in question I saw that a legacy user IORepl (which was used by the Inter-Org Replication Tool for a previous cross-forest migration) is associated with the database.
You can do two things here:
- Clear the HomeMDB attribute
- Delete the object.
This fixed the problem. No idea why it didn't return the mailbox object in PowerShell!