title: Exchange - listing mailboxes in an OU with their mailbox size
body: <p>I'm trying to display all the mailboxes and their sizes for all our users in our Departed OU. I seem to be very close but my command seems to be adding some padding to the results.</p>
  
  <pre><code>[PS] C:\Windows\system32&gt;dsquery user "ou=Departed,ou=Staff,dc=COMPANY,dc=local" -limit 4 | dsget user -samid | Get-MailboxStatistics | ft DisplayName, TotalItemSize, ItemCount
  </code></pre>
  
  <p>And the output:</p>
  
  <pre><code>Dsquery has reached the specified limit on number of results to display; use a different value for the -limit option to
  display more results.The specified mailbox "  samid                 " doesn't exist.
      + CategoryInfo          : NotSpecified: (0:Int32) [Get-MailboxStatistics], ManagementObjectNotFoundException
      + FullyQualifiedErrorId : DD7D7CEA,Microsoft.Exchange.Management.MapiTasks.GetMailboxStatistics
  
  The specified mailbox "  Eka.Tian              " doesn't exist.
      + CategoryInfo          : NotSpecified: (1:Int32) [Get-MailboxStatistics], ManagementObjectNotFoundException
      + FullyQualifiedErrorId : 7F701DFD,Microsoft.Exchange.Management.MapiTasks.GetMailboxStatistics
  </code></pre>
  
  <p>Obviously shouldnt work for the first result "samid" but "Eka.Tian" exists. Why is it adding all those spaces? Is there a way I could format the output from dsget user so it plays nice with Get-MailboxStatistics?</p>