OS je MS Windows Server 2012R2.
A zde je několik PowerShell příkazů pro práci s mailboxem ve stavu soft-deleted nebo disabled (zakázaných).
Seznam zakázaných mailboxů (disabled mailbox) se vypíše v PowerShellu takto:
Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisconnectReason -eq "Disabled" } | ft DisplayName,Database,DisconnectDate,ItemCount
Seznam soft-deleted mailbox:
Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisconnectReason -eq "SoftDeleted" } | ft DisplayName,Database,DisconnectDate,ItemCount
Seznam disabled + soft-deleted mailbox
Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisconnectReason -ne $null } | fl DisplayName,MailboxGuid,Database,DisconnectReason
Smazání jednoho konkrétního mailboxu ve stavu soft-deleted
Remove-StoreMailbox -Database database -Identity "name mailbox" -MailboxState SoftDeleted
Smazání jednoho konkrétního mailboxu ve stavu disbaled
Remove-StoreMailbox -Database database -Identity "name mailbox" -MailboxState Disabled
Smazání všech mailboxu ve stavu soft-deleted z jedné konkrétní databáze
Get-MailboxStatistics -Database database | where {$_.DisconnectReason -eq "SoftDeleted"} | ForEach {Remove-StoreMailbox -Database $_.Database -Identity $_.MailboxGuid -MailboxState SoftDeleted}
Smazání všech mailboxu ve stavu disabled z jedné konkrétní databáze
Get-MailboxStatistics -Database database | where {$_.DisconnectReason -eq "Disabled"} | ForEach {Remove-StoreMailbox -Database $_.Database -Identity $_.MailboxGuid -MailboxState Disabled}
Žádné komentáře:
Okomentovat