title: Is it possible to speedup Get-Mailboxstatistics for exchange online?
body: <p>I need to run <code>Get-MailboxStatistics</code> for 4000 users, I'm thinking there is a way to speedup <code>Get-MailboxStatistics</code>.</p>
  
  <p>I have read in a forum how to use <code>Get-MailboxStatistics -Server</code>, but I think it cannot be used for Exchange Online. As we don't know the servers where the mailboxes are.</p>
  
  <p>Can I use the below cmdlet:</p>
  
  <pre><code>$MailboxStat = Invoke-Command -ScriptBlock {
      Get-MailboxStatistics $mailbox.UserPrincipalName |
          Select-Object TotalItemSize,DisplayName 
   }
  </code></pre>
  
  <p>I just need <code>TotalItemSize</code> and <code>DisplayName</code> for each mailbox user. I don't know whether this will really speedup.</p>