Cara hapus disconnected mailboxes di Server Exchange 2010

List mailbox databases guid
> Get-MailboxDatabase |ft Name, Guid

List disconnected mailboxes in a specific database
> Get-MailboxStatistics -Database | Where-Object {$_.DisconnectDate -Notlike $NULL} | FL DisplayName, DisconnectDate, MailboxGuid

Delete a specific disconnected mailbox
> Remove-Mailbox -Database “” -StoreMailboxIdentity -confirm:$false

Delete all disconnected mailboxes in a specific database
> $users = Get-MailboxStatistics -Database “” | where-object { $_.DisconnectDate -ne $null } | Select DisplayName,MailboxGuid,Database

> $users | ForEach { Remove-Mailbox -Database $_.Database -StoreMailboxIdentity $_.MailboxGuid -confirm:$false }

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s