Exchange 2010 how to determine the available free space on mailbox databases

Prior to Microsoft Exchange Server 2010 the available free space was written in the eventlog as Event ID 1221.
However in Exchange 2010 this event isn’t logged anymore, because the database maintenance runs constantly in the background (24hx7d). Deleted items and mailboxes which have passed the deleted item retention period are deleted almost immediately, instead of waiting for the next database maintenance window.

To determine the available free space in an Exchange Server 2010 mailbox database use the following command in the Exchange Management Shell (EMS).
Get-MailboxDatabase -Status | ft Name, Databasesize, AvailableNewMailboxSpace –Auto
Get-PublicFolderDatabase -Status | ft Name, Databasesize, AvailableNewMailboxSpace -Auto