AndersonPatricio.ca

A Microsoft Unified Communications resource blog

Recent Posts

Search by Topic

Email Notifications

Blogroll

My Microsoft KBs

.:. About me..

Microsoft Community

Andy's Toolbox

Archives

Ads

Removing disconnected mailboxes in Exchange Server 2007

Hello folks,

Exchange Server 2007 doesn't allow us to purge the disconnected mailbox. In order to remove one or multiple disconnected mailboxes we can be performing these steps:

Listing all disconnected mailboxes

Get-MailboxStatistics | where-object { $_.DisconnectDate -ne $null } | Select DisplayName,MailboxGuid

Removing a single entry

Remove-Mailbox -Database <Database-Name> -StoreMailboxIdentity <MailboxGuid> -confirm:$false

Removing all users at the same time

$users = Get-MailboxStatistics | where-object { $_.DisconnectDate -ne $null } | Select DisplayName,MailboxGuid

Now that we have all disconnected mailboxes in a var, we can run the following cmdlet to remove all of them:

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


Best Regards,
Anderson Patrico

Technorati : , , ,
Del.icio.us : , , ,
Ice Rocket : , , ,

Comments

Ghillie Suits » Removing disconnected mailboxes in Exchange Server 2007 - Anderson Patricio Get-news Blog said:

Pingback from  Ghillie Suits &raquo; Removing disconnected mailboxes in Exchange Server 2007 - Anderson Patricio Get-news Blog

# October 26, 2007 1:02 PM

Jon said:

THANK YOU!!! THANK YOU!!! THANK YOU!!! THANK YOU!!! THANK YOU!!!

This worked GREAT!!

# November 14, 2007 3:31 PM

Daniel said:

Thanks...

just a little improvment to remove on all databases of the server:

$users = Get-MailboxStatistics | where-object { $_.DisconnectDate -ne $null } | Select DisplayName,MailboxGuid,Database

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

# November 27, 2007 11:06 AM

Exchange 2007 - boites aux lettres d?connect?es | hilpers said:

Pingback from  Exchange 2007 - boites aux lettres d?connect?es | hilpers

# January 18, 2009 6:11 AM

Exchange 2007 cannot purge a disconnected mbx after 30-day retenti | keyongtech said:

Pingback from  Exchange 2007 cannot purge a disconnected mbx after 30-day retenti | keyongtech

# January 18, 2009 11:09 AM

Data recovery service experts said:

Recovery starts with knowing which solution you need to reclaim the lost data. File recovery is the most common one but advanced users often rely a a partition product if the circumstance allows it. Service is for a failing hard drive.

# June 8, 2009 7:08 AM
Leave a Comment

(required) 

(required) 

(optional)
 

(required) 

If you can't read this number refresh your screen
Enter the numbers above: