Use Clean-Mailboxdatabase with Exchange Server 2013

If can’t find the clean-mailboxdatabse cmdlet In Exchange Server 2013 it’s because the cmdlet has been removed from Exchange Server 2013.

The cmdlet Is very handy when needing to connect a disconnected mailbox and the mailbox doesn’t appear In the screen because of the replication lag.

In Exchange Server 2013 we can use the Update-StoreMailboxState instead
however you can’t apply it to a DAG.

The cmdlet needs to apply to each DB In the following format.

Get-MailboxStatistics -Database MBX01 | ForEach { Update-StoreMailboxState -Database $_.Database -Identity $_.MailboxGuid -Confirm:$false }