Wouldn’t it be good to have an easy way to get the total size of all mailboxes you host in Exchange Online? Yes?
Challenge accepted! Using the new Exchange Online PowerShell module V2, it is a simple 1-liner. The following command will give you the sum in Megabytes:
((get-exomailbox -ResultSize Unlimited | get-exomailboxstatistics).TotalItemSize.Value.ToMB() | measure-object -sum).sum
Categories: Microsoft 365, PowerShell
Does this include the size of the Online Archives?
LikeLike
hello,
What can be the command to have total item count for all mailboxes ?
LikeLike
Hi,
Thanks for the script,
But unfortunately, I’m getting the below error:
You cannot call a method on a null-valued expression.
At line:1 char:1
+ ((get-exomailbox -ResultSize Unlimited | get-exomailboxstatistics).To …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
LikeLike
Hello! If i want know size for mailboxes fom CSV file ?
LikeLike
Use the Export-Csv cmdlet. Best, P
LikeLike