Bulk Mailbox Size query

Get-Content users.txt |get-mailbox | get-mailboxstatistics | select-object DisplayName,TotalItemSize

A better way of doing this is given below.

Get-Content users.txt | ForEach-Object {Get-Mailbox $_ | Get-MailboxStatistics | Select-Object DisplayName, {$_.TotalItemSize.Value.ToMB()}}

You can replace ToMB() with ToGB() or ToTB().

— Thanks, Jinesh.

Advertisements