There are many cool scripts on the Technet about mailbox size and quota reporting. The same about searching for them on Bing or Google. Sometimes we just are searching for remembering a simple PowerShell command and not too much text to read in articles. For this reason I have created on my Blog the Technical FAQ’s where I have updated some one-liner commands ready to use. For Reporting tasks I thought to write a short article with the most useful commands… (As brain memory)


Here we go:

Get top list of big mailboxes, sorted by size:

Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | Select-Object DisplayName,StorageLimitStatus,TotalItemSize -First 100  | Sort-Object TotalItemSize

Find those who have reached their quota already:

Get-Mailbox -Resultsize Unlimited | Get-MailboxStatistics | where {$_.StorageLimitStatus -eq “IssueWarning”}
Get-Mailbox -Resultsize Unlimited | Get-MailboxStatistics | where {$_.StorageLimitStatus -eq “ProhibitSend”}

Or you are also able, to combine both:

Get-Mailbox -Resultsize Unlimited | Get-MailboxStatistics  | where {($_.StorageLimitStatus -contains “ProhibitSend”) –or ($_.StorageLimitStatus -contains “IssueWarning”)}

Here the way, how to set a new quota to issue warning at 9 GB and issue send at 9.5 GB

Set-Mailbox <mailbox> -UseDatabaseQuotaDefaults $false -IssueWarningQuota 9GB -ProhibitSendQuota 9.5GB

Note: The change does not take place immediately.

To get some information on the size of the Archive mailboxes:

Get-Mailbox | Get-MailboxStatistics -Archive -ErrorAction SilentlyContinue | ft DisplayName,TotalItemSize

So, that’s all for this time… As promised, just some commands for remembering…

I hope you had fun to read it.