title: Sorting on Associative Array
body: <p>Here's a script I'm using to get current mailbox limits, quotas, StorageLimitStatus and TotalItemSize for Exchange 2007 mailboxes.</p>
  
  <pre><code>Get-MailboxDatabase |`
      Get-Mailbox |`
      Format-Table DisplayName,IssueWarningQuota,ProhibitSendQuota,`
          @{label="TotalItemSize";expression={(get-mailboxstatistics $_).TotalItemSize.Value.ToMB()}},`
          @{label="StorageLimitStatus";expression={(Get-MailboxStatistics $_).StorageLimitStatus}} |`
      Sort-Object -Property ********
  </code></pre>
  
  <p>I'd like to sort on the values contained in the two associative arrays e.g. Sort first by StorageLimitStatus, then by TotalItemSize.</p>
  
  <p>My limited understanding of Powershell prevents me from building the correct Sort-Object. Any ideas?</p>