Exchange 2013 no Clean-MailboxDatabase command?

I went to run a Clean-MailboxDatabase command today to show a recently disconnected mailbox but found that this command has now been decommissioned for Exchange 2013 and replaced with Update-StoreMailboxState (http://technet.microsoft.com/en-us/library/jj860462(v=exchg.150).aspx). But you need to know the GUID of the disconnected mailbox – I didn’t take note of that! So to get it to do all mailboxes in a particular DB you need to run the following:

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

After that completed up popped my disconnected mailbox as expected.

Hope it helps!

About the author