I am Dale Hayter, a Microsoft and VMware certified Technical Consultant.

My blog has been built up over the years from my experience of working on an IT helpdesk and also from being out on-site.

Exchange 2010 Move Request Error – Failed to clean up the source mailbox after the move

When carrying out a move request in Exchange 2010 you might get the move request status come back up as “Completed with warning”.

On closer examination under the Details tab we get the error :

Warning: Failed to clean up the source mailbox after the move.
Error details: MapiExceptionUnexpectedMailboxState: Unable to delete mailbox. (hr=0x80004005, ec=2634)
Exchangewarning

This seems to be caused by a weird bug in exchange. The source mailbox will now be in a soft deleted state but should still be accessible from the new location.

The source mailbox will be automatically removed after the mailbox retension period.

If you want to get a list of all mailboxs that are in this state you can run the following powershell command :-

Get-MailboxStatistics -Database "Database Name in Here" | Where-Object {$_.DisconnectDate -Notlike $NULL} | Format-Table DisplayName, DisconnectDate, MailboxGuid, DisconnectReason –Wrap

If you want to remove them straight away you can run the following command to get remove all disconnected mailboxes in a database :

$Mailboxes = Get-MailboxStatistics -Database "Database Name in Here" | where {$_.DisconnectReason -eq “SoftDeleted”}
$Mailboxes | foreach {Remove-StoreMailbox -Database $_.database -Identity $_.mailboxguid -MailboxState SoftDeleted}

To remove a specific softdeleted mailbox the command below can be used :

Remove-StoreMailbox -database “Mailbox name in here” -identity “User Alias here” -MailboxState SoftDeleted