Powershell script to export Exchange mailbox sizes as a CSV

The following one liner will export all mailboxes with size details to a csv file. Save it at as a .ps1 script for ease of use.

Get-MailboxStatistics | where {$_.ObjectClass -eq “Mailbox”} | Sort-Object TotalItemSize -Descending | select-object @{expression={$_.DisplayName}},@{expression={$_.TotalItemSize.Value.ToMB()}},@{expression={$_.ItemCount}},@{expression={$_.StorageLimitStatus}} | Export-Csv mailboxes.csv

Share and Enjoy:
  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Twitter
  • Google Bookmarks

Leave a Reply

Your email address will not be published. Required fields are marked *

*