If you want to remove all disconnected mailboxes from a database, run the following command
Get-MailboxStatistics –Database “dbname” | Where-Object {$_.DisconnectReason –eq “Disabled”} | ForEach {Remove-StoreMailbox –Database $_.database –identity $_.mailboxguid –MailboxState Disabled
If you want to remove all soft-deleted mailboxes from a database, run the following command
Get-MailboxStatistics –Database “dbname” | Where-Object {$_.DisconnectReason –eq “Softdeleted”} | ForEach {Remove-StoreMailbox –Database $_.database –identity $_.mailboxguid –MailboxState Softdeleted
http://penetrateit.wordpress.com/2012/03/07/exchange-2010-purgeremove-disconnected-or-soft-deleted-mailboxes/
Get-MailboxStatistics –Database “dbname” | Where-Object {$_.DisconnectReason –eq “Disabled”} | ForEach {Remove-StoreMailbox –Database $_.database –identity $_.mailboxguid –MailboxState Disabled
If you want to remove all soft-deleted mailboxes from a database, run the following command
Get-MailboxStatistics –Database “dbname” | Where-Object {$_.DisconnectReason –eq “Softdeleted”} | ForEach {Remove-StoreMailbox –Database $_.database –identity $_.mailboxguid –MailboxState Softdeleted
http://penetrateit.wordpress.com/2012/03/07/exchange-2010-purgeremove-disconnected-or-soft-deleted-mailboxes/
Комментариев нет:
Отправить комментарий