Delete disconnected mailbox in Exchange 2007

Statut
N'est pas ouverte pour d'autres réponses.

Xavier Mustin

Administrator
Staff member
#1
When you have deleted an mail-enabled Active Directory account, the mailbox will be moved to Disconnected Mailbox in your Exchange Management Console.
To delete (purge) the disconnect mailboxes from a database, you run the following command from your Exchange Management Shell:

To verify that only the disconnected mailboxes will be removed, you run the following command
This will list all current disconnected mailboxes.
Code:
Get-MailboxStatistics -database "server\database" | where {$_.disconnectdate -ne $null}
This command first retrieves all disconnected mailboxes from your server\database, and then runs the Remove-mailbox command for every mailbox.
Code:
Get-MailboxStatistics -database "server\database" | where {$_.disconnectdate -ne $null} | foreach {Remove-mailbox -database $_.database -storemailboxidentity $_.mailboxguid}
 
Statut
N'est pas ouverte pour d'autres réponses.
Haut