"Uninstall cannot continue. Database 'Mailbox Database 0186314254': This mailbox database contains one or more mailboxes or arbitration mailboxes. To get a list of all mailboxes in this database, run the command Get-Mailbox -Database
So I removed the user maibloxes, but had no idea how to remove arbitration mailboxes, after some googling here is what I did:
in Exchange Management Shell
Get-Mailbox -Arbitration | Remove-Mailbox -Arbitration -RemoveLastArbitrationMailboxAllowed
this should remove all arbitration mailboxes.
Or you can do the following
get-mailbox -arbitration | fl name, identity
After you get the ID of those mailboxes you can remove them one by one with the following command:
remove-mailbox -identity "domain.com/Users/SystemMailbox{1f05a927-563f-4671-8a1b-487764400889}" -arbitration -RemoveLastArbitrationMailboxAllowed
If all went smooth you can try uninstalling Exchange Server.
Links: http://social.technet.microsoft.com/Forums/en-US/exchange2010/thread/d058717e-bf70-4449-91c2-fa00b47d415f