Get Mailbox and Archive Mailbox Size and Item Count: 


This scipt will get all Mailbox Name, Mailbox Size, and Item Count for both the Primary Mailbox and the Archive Mailbox for the entire tenant. 



The sample scripts are not supported under any Microsoft standard support program or service. The sample scripts are provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages. 
This posting is provided "AS IS" with no warranties, and confers no rights.   
Author: Clint Oliveira 
Version 1.0  
-Initial Release  
-Thanks to all of the Script Center commenters for feedback!  
---------------------------------------------------------------------------- #> 
Get-Mailbox -resultsize unlimited | Select-Object name,@{n="Primary Size";e={(Get-MailboxStatistics $_.identity).totalItemsize}}, 
@{n="Primary Item Count";e={(Get-MailboxStatistics $_.identity).ItemCount}},  
@{n="Archive Size";e={(Get-MailboxStatistics -archive $_.identity).TotalItemSize}}, 
@{n="Archive Item Count";e={(Get-MailboxStatistics -archive $_.identity).ItemCount}} | ft 


Here is a sample output: 


Best practices to keep your mailbox lean

If your email is stored on an email server such as Exchange, when your mailbox reaches its upper limit your administrator might start limiting functionality. For example, at 90 MB you might get a warning, at 100 MB you might be unable to send email, and at 110 MB you might be unable to receive email.

Here are some ways to keep your mailbox size under control:


Manage my mailbox size