Exchange 2010 – remove mailbox – disabled or soft deleted

This command help you to view all deleted o r disabled mailbox in a specific database. PS command

Get-MailboxStatistics -Database “database” | Where-Object {$_.DisconnectDate -Notlike $NULL} | Format-Table DisplayName, DisconnectDate, MailboxGuid, DisconnectReason –Wrap

 

This command help you to remove SoftDeleted mailbox in a specific database.

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

 

This command help you to remove Disabled mailbox in a specific database.

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

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *