I am migrating from one Exchange 2013 server to another. I am at the point where everything is running on the new server, and I am trying to uninstall Exchange. It's failing to remove the mailbox database, insisting that mailboxes are in it that I have confirmed are not. The following commands produce no results:
Get-Mailbox -Database "Mailbox Database 1096099116"
Get-Mailbox -Database "Mailbox Database 1096099116" -Archive
Get-Mailbox -Database "Mailbox Database 1096099116" -Arbitration
Get-Mailbox -Database "Mailbox Database 1096099116" -PublicFolder
Get-Mailbox -Database "Mailbox Database 1096099116" -Monitoring
However, attempting Remove-MailboxDatabase -Identity "Mailbox Database 1096099116" -Verbose produces the following error:
VERBOSE: [16:02:40.757 GMT] Remove-MailboxDatabase : Mailbox with DistinguishedName <<omitted>> is still present in this database.
And yet, when I look at the user's mailbox, there is no reference at all to the old database. It currently resides on the new database. Moving it to the old database and back again didn't fix it. Originally, this was the domain administrator account in the error. We don't really use it for anything but checking mail flow, so I disabled the mailbox and tried again. Now it is throwing the same error on a different user's mailbox which I cannot delete.
I've verified replication among my DCs and also tried specifying a different one in some of the commands, and nothing changed. I'm at a loss as to where to go from here. I can't find anything still present in that database, but it insists there are still mailboxes in it and will not let me remove it or uninstall Exchange.