Score:0

How to delete orphaned mailboxes

cn flag

I have no clue how this could happen:

Get-MailboxStatistics -Server returns 2 exactly equal entries Office [Foo Software] [It shows the used format]. One mailbox has 411 ItemCount, the other has 7.

In the Exchange Management Console there is no user associated to these mailboxes and Get-Mailbox does NOT return these 2 entries. Get-User shows users which have another mailboxes. It looks to me as Exchange has here some inconsistency.

Also, in Exchange Console under Recipient configuration I see a disconnected mailbox with the name Office [Foo Software] - Trying to connect it fails because no proper user is found.

How can I delete this 2 equal and orphaned mailboxes? It's true, I had users with this name but I deleted them in the Exchange Management Console.

Environment:

  • Exchange Server 2010
  • SBS 2011 Standard

Update:

In the meantime I could at least delete the one mailbox with 411 ItemCount. Also, the above mentioned disconnected mailbox disappeared from the Exchange Management Console.

Get-MailboxDatabase | Get-MailboxStatistics | Where{ $_.DisplayName -eq "Office [Foo Software]" } |fl DisplayName, Database, Identity, DisconnectReason returns now this:

DisplayName      : Office [Foo Software]
Database         : Mailbox Database
Identity         : f3ed13de-ae8a-4c0a-9d4d-b641d35e0335
DisconnectReason : 

When I try to disable this mailbox with Disable-Mailbox -Identity "f3ed13de-ae8a-4c0a-9d4d-b641d35e0335" then I get the error that the mailbox doesn't exist.

I have to disable it first because when I try to remove the mailbox I am asked for the MailboxState but it cannot be empty.

So, now the question is, how can I delete the mailbox using its uuid?

Score:0
cn flag

With this steps I could delete the remaining Office [Foo Software] mailbox:

  1. Run in the Exchange Powershell Get-MailboxStatistics -Server '<ServerName>' | WHERE {$_.ObjectClass -eq "Mailbox"} | FL DisplayName,LastLoggedOnUserAccount,MailboxGuid.
  2. LastLoggedOnUserAccount has the name of the user which was previously assigned to this mailbox.
  3. Create this user again BUT ONLY in the AD - NOT as an Exchange user.
  4. Connect manually the new AD user with Connect-Mailbox -Database "Mailbox Database" -Identity "Office [Foo Software]" -User <LastLoggedOnUserAccount> to the mailbox.
  5. Delete the user in the Exchange Management Console. Now its mailbox is marked as Disabled.
  6. Remove the mailbox with Remove-Mailbox -Database "Mailbox Database" -StoreMailboxIdentity "f3ed13de-ae8a-4c0a-9d4d-b641d35e0335" where StoreMailboxIdentity is the value returned in 1) as MailboxGuid

I don't claim this is the simplest way, but it worked for me. Now both mailboxes with the same DisplayName have been successfully removed from the Exchange.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.