Some mailboxes in an Exchange organization can become disconnected from corresponding user accounts. The following EMS command can locate these disconnected mailboxes:

Get-MailboxStatistics | where {$_.DisconnectDate –ne $null}

This command builds on the Get-MailboxStatistics EMS command, and looks at the disconnect date to verify that it’s not equal to null (-ne $null). The two dollar signs are used to declare variables.

If you want to reconnect disconnected mailboxes, pipe the original command’s output into the Connect-Mailbox command, as such:

Get-MailboxStatistics | where {$_.DisconnectDate –ne $null} | Connect-Mailbox –Database “<mailbox database name>”