Delete Softdeleted mailboxes

Problem:

When moving a mailbox from a Database to another Database the original Mailbox isn’t deleted but is softdeleted. Which means the space isn’t availible for new mail.

Solution:

Delete the Softdeleted mailboxes. Use te following command to delete all softdeleted mailboxes. Get-MailboxStatistics –Database “Mailbox Database 1675289436” | Where-Object {$_.DisconnectReason –eq “Softdeleted”} | ForEach {Remove-StoreMailbox –Database $_.database –identity $_.mailboxguid –MailboxState Softdeleted}

Use this one when you recieve the following error: Pipeline not executed because a pipeline is already executing. Pipelines cannot be executed concurrently.

$Mailboxes = Get-MailboxStatistics  -Database “MailboxDatabase-A-F” $Mailboxes | where {$_.DisconnectReason -eq “SoftDeleted”} | foreach {Remove-StoreMailbox -Database $_.database -Identity $_.mailboxguid -MailboxState SoftDeleted}

Links:

http://www.howexchangeworks.com/2010/09/purge-disconnected-or-soft-deleted.html http://technet.microsoft.com/en-us/library/dd351136.aspx

Posted in: Exchange 2010, Microsoft

banner