| Subcribe via RSS

Remove disconnected mailboxes in Exchange 2007

August 15th, 2009 Posted in Exchange server, Mail server, Windows
Your Ad Here

In Exchange 2007, there are two options to delete a mailbox:
1.  Remove Mailbox
2.  Disable Mailbox
If you remove a mailbox, the mailbox data that is stored in the Exchange mailbox database is marked for deletion and the associated user account is also deleted from Active Directory. If you disable a mailbox,  the user account is retain, it will only disassociate the mailbox data from the user account.

Exchange retain disconnected mailboxes in the mailbox database based on the deleted mailbox retention settings configured for that mailbox database. In Exchange 2007, the default retention period is 30 days.  During this time, the disconnected mailbox can be recovered by associating it with an existing Active Directory user account.  After the specified retention period, a disconnected mailbox is permanently deleted from the Exchange mailbox database.

You can see the list of disconnected mailboxes in Exchange Management Console or use the cmdlet in Exchange Management Shell.

To list all disconnected mailboxes in Exchange Management Shell, run the following cmdlet.

[PS] C:\>Get-MailboxStatistics | where-object { $_.DisconnectDate -ne $null } | Select DisplayName,MailboxGuid

DisplayName         MailboxGuid
-----------         -----------
User1               4ddc1d42-9f8e-4b02-b53f-9fb8421d9423
User2               6f067dce-24fc-4c83-b90a-532728d5b510
User3               e66197d8-d7b5-4ca6-8c25-72825dc82daf

To remove a specific disconnected mailbox, run the following cmdlet:

[PS] C:\>$Temp = Get-MailboxStatistics | Where{$_.DisplayName -eq “User3″}
[PS] C:\>Remove-mailbox -Database “Mailbox Database” -StoreMailboxIdentity $Temp.MailboxGuid

Confirm
Are you sure you want to perform this action?
Removing store mailbox "e66197d8-d7b5-4ca6-8c25-72825dc82daf" on database "server1.mydomain.com\Mailbox Database".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help
(default is “Y”):Y

To remove all disconnected mailbox, run the following cmdlet:

[PS] C:\>$users = Get-MailboxStatistics | where-object { $_.DisconnectDate -ne $null } | Select DisplayName,MailboxGuid,Database
[PS] C:\>$users | ForEach { Remove-Mailbox -Database $_.Database -StoreMailboxIdentity $_.MailboxGuid -confirm:$false }

Share this article:
  • Print this article!
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • E-mail this story to a friend!
  • LinkedIn
  • Live
  • MySpace
  • RSS
  • Technorati
  • StumbleUpon
  • Twitter
  • Yahoo! Bookmarks

Related posts:

  1. Only disconnected mailboxes can be reconnected
  2. How to update the Disconnected Mailbox list in Exchange 2007
  3. How to uninstall Exchange Server 2007
  4. Installing Exchange Server 2007 SP2
  5. Error moving default offline address book generation server

Leave a Reply



  • Masukkan Code ini K1-FB421C-6
    untuk berbelanja di KutuKutuBuku.com


    Produk SMART Telecom




    ShoutMix chat widget