The command below will retrieve disconnected / deleted mailboxes from a given Exchange server using Powershell.
Get-MailboxStatistics -Server <server> | where { $_.DisconnectDate -ne $null } | Select Displayname, DisconnectDate, TotalItemSize -Autosize
Below is a Powershell command to retrieve disconnected mailboxes for the last 7 days:
Get-MailboxStatistics -Server corp2k7mail | Where-Object {$_.DiscconnectDate -gt (Get-Date).AddDays(-7)} |ft Displayname, ServerName, DatabaseName, TotalItemSize –Autosize
To reconnected a disconnected mailbox to a user object still in AD type:
Connect-Mailbox -Database <Mailbox_Database> -Identity <Deleted_Mailbox>
Leave a comment