TotalItemSize
-------------------------
75.33 MB (78,991,829 bytes)
Using string manipulation, I am able to pull out the mailbox size.
"75.33 MB"
Then using Powershell's own Invoke-Expression, convert that down to a number (in bytes).
78989230.08
Now, I can use the Measure-Object command to give me statistics.
get-mailbox -resultsize 100 | select @{Name="Size";Expression={(Invoke-Expression ((get-mailboxStatistics -identity $_.identity).totalitemsize.tostring().split("(")[0].replace(" ",""))) / 1mb}} | measure-object -property size -min -max -average -sum
Count : 100
Average : 28.4768
Sum : 2847.68
Maximum : 500.8
Minimum : 0
Property : Size
No comments:
Post a Comment