Delete a disconnected mailbox

Today I needed to remove a mailbox that has been disconnected, but this option isn’t available from the Exchange Management Console so I turned to PowerShell.  First, I used the Get-MailboxStatistics cmdlet to generate a list of disabled mailboxes:

Get-MailboxStatistics -Database MBD01 | Where {$_.DisconnectReason -Eq “Disabled”}

or

Get-MailboxStatistics -Database MBD01 | Where {$_.DisconnectReason -Eq “SoftDeleted”}

Then used the Remove-StoreMailbox cmdlet to remove the mailbox:

Remove-StoreMailbox -Database MBD01 -Identity “Ricky Gervais” -MailboxState Disabled

Remove-StoreMailbox

[BlogBookmark] [Blogsvine] [del.icio.us] [Digg] [Facebook] [Furl] [Google] [LinkedIn] [MySpace] [Reddit] [Slashdot] [StumbleUpon] [Twitter] [Windows Live] [Yahoo!] [Email]