Another administrator had this question:
I found the solution for cleaning up the Exchange server mailboxes:
Clean-MailboxDatabase -Identity
How do I Find the database id for executing the command?
To get the MaiboxDatabase GUID use this cmdlet:
Get-MailboxDatabase | fl Identity, Guid
You can clean all MailboxDatabases using the following cmdlet:
Get-MailboxDatabase | Clean-MailboxDatabase
To learn more about Get-MailboxDatabase, see the following TechNet article
https://technet.microsoft.com/en-us/library/bb124924.aspx