When we make use of Exchange Server 2007 SP1 & Windows Powershell, if we have a requirement to sort the mailboxes based on their size on the ascending order, then try this command:

Get-MailboxStatistics -Server Servername | Sort-Object -Property TotalItemSize | Format-Table DisplayName,TotalItemSize