Using the Exchange Management Console, run this command (change the exchange server name):
1 2 3 |
get-mailboxstatistics -server ex01 | where {$_.objectclass -eq "mailbox"} | sort totalitemsize -desc | select displayname, totalitemsize |
The above script will produce a list of every single mailbox. If you want it limited to just the top n mailboxes (10 in the below example) try this:
1 2 3 |
get-mailboxstatistics -server ex01 | where {$_.objectclass -eq "mailbox} | sort totalitemsize -desc | select -first 10 displayname, totalitemsize |
You can get all mailboxes, sorted by size (in MB) and output to a CSV file with this:
1 2 3 |
get-mailboxstatistics -server ex01 | where {$_.objectclass -eq "mailbox"} | sort totalitemsize -descending | select displayame,@{label="Total Size (MB)";expression={$_.totalitemsize.value.ToMB()}} | export-csv "c:\temp\mailbox_size.csv" |