I have been watching Don’s PowerShell nuggets on CBT Nugget and I know there has to be a more efficient way to get this info. It currently takes about 60 seconds to work through 975 mailboxes. I would actually prefer a nudge in the right direction (i.e. what help files to look at) instead of a full solution. I took this a full solution from somewhere and I am struggling to fully understand it. I am hoping that with a little guidance I can fully understand what is happening and be able to grow from it.
Get-Mailbox -RecipientTypeDetails UserMailbox| Get-MailboxStatistics | where {$.TotalItemSize -gt 1073741824}| sort-object TotalItemSize -descending |
Add-Member -MemberType ScriptProperty -Name TotalItemSizeinMB -Value {$this.totalitemsize.value.ToMB()} -PassThru |
Select @{Expression={$.DisplayName};Label=“User”}, @{Expression={$.TotalItemSizeinMB};Label=“Size (MB)”}, @{Expression={“{0:P0}” -f ($.TotalItemSizeinMB/1024)};Label=“Amount Over 1 GB”}
Thanks,
Russell