Get and Connect a Disconnected Mailbox Using PowerShell
Get and Connect a Disconnected Mailbox Using PowerShell
To quickly find all disconnected Mailboxes in your Exchange environment launch EMC and run the following one liner.
Get-MailboxStatistics -Server ThaLazyExMBX01| where { $_.DisconnectDate -ne $null } | select DisplayName,MailboxGuid,Database,DisconnectDate
The Results will look as follow:
Now that we have the results lets refine the search to find a specific “Disconnected Mailbox”
Get-MailboxStatistics -server ThatLazyExMBX01| Where-object {($_.DisconnectDate -ne $null) -and ($_.DisplayName -eq "Manju")}
The Results will look as follow:
Now that we have the “Disconnected Mailbox” we are looking for so lets go ahead and re-connect the Mailbox.
To reconnect the mailbox run the following one liner
Connect-Mailbox -Database ThatLaxyEXdb07 -Identity "Manju" -User "Manju"
and there you go , quick and easy to find and connect a disconnected mailbox using PowerShell.