Exchange 2013 SP1.
Ran into this issue with my Exchange 2013 test environment. Basically I have an "orphaned" mailbox that I am unable to delete because there is no AD object for the mailbox. This is probably easy i just cant figure out how to remove it. When I try "remove-storemailbox" it thows back the "operation couldnt be performed because the object "username" couldnt be found.
Any ideas how I can remove this orphaned box?
thanks
*****************************************
Info on how I got here in case this is not an easy fix:
Deleted a particular user mailbox from EAC to free some room up. I then wanted to purge the mailbox from the back end as it was still in database do to mailbox retention.
I then did the following to make sure it was disconnected and to get the GUID for removal:
Get-MailboxDatabase | Ge-MailboxStatistics | where { $_.Displayname "the user" } | fl DisplayName,Database,DisconnectReason,MailboxGuid
To my suprise It listed the mailbox as being in two databases. The mailbox GUID was the same for both. One of the databases (the users active database at time of deletion) was listed with disconnect reason as disabled as expected. The other database has the disconnectedreason property as blank.
My guess is that this "dual database" happened during mailbox migration from Exchange 2007. For this user, I do believe the migration failed initially to the first database (the one that is showing with no disconnectedreason) and I then had to fix the issue and restart the migration and it finished successfully to the second database.
I wrote this off and proceeded to purge the mailbox using the "remove-StoreMailbox -Identity "username" -MailboxState Disabled" command.
This removed the disconnected mailbox, however the other orphaned mailbox is still there! Now I cant figure out how to remove this orphaned mailbox, because there is no longer an AD account associated with the mailbox and I run into the object couldnt be found error.
How can I get this mailbox removed?