At the end of a SBS 2008 to SBS 2011 migration i was attempting to uninstall Exchange 2007 and received the error message.
(Uninstall cannot continue. Database ‘Mailbox Database’ This mailbox database contains one or more mailboxes. To get a list of all mailbox’s in this database run the command Get-Mailbox -Database . To disable a mailbox so that you can delete the mailbox database, run the command Disable-mailbox)
It appeared there were some system mailboxes still in the mail store that couldn’t be removed automatically.
To move the mailboxes use the following commands replacing your mailbox details with these.
1. Open the console the FinalDC in the Start Menu below Microsoft Exchange Server 2010. Once the console is open run this command (I have added the literal names of your databases to this command for you):
Get-Mailbox -Arbitration -Database “Mailbox Database” | New-MoveRequest -TargetDatabase “Mailbox Database 2013010811”
2. Once that is done successfully, you should see the ExchSwingTool confirms that there are no mailboxes remaining on the TempDC Exchange 2007 store.
3. You will need to use Exchange Manangement Console to remove any remaining Move Requests reports or pending requests, then you can decommission the TempDC Exchange.