How to permanently delete soft deleted mailboxes

 

How to permanently delete soft deleted mailboxes (created by mailbox database move)

Step 1:

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

Step 2:

$Mailboxes = Get-MailboxStatistics -Database "Mailbox Database" | where {$_.DisconnectReason -eq "SoftDeleted"}

Step 3:

$Mailboxes | foreach {Remove-StoreMailbox -Database $_.database -Identity $_.mailboxguid -MailboxState SoftDeleted}

Step 4:
Confirm
Are you sure you want to perform this action?
Removing mailbox “7fc19f78-06e7-449a-aad1-c98852c414f8” on database “Mailbox Database”.
[Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is “Y”):


Y

 

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>


*