Remove disconnected mailboxes from the database using Powershell in Exchange 2007

Get-MailboxStatistics -database “SERVERMailbox Database” | where {$_.disconnectdate -ne $null} | foreach {Remove-mailbox -database $_.database -storemailboxidentity $_.mailboxguid}

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.