-->

Saturday, August 5, 2017

Exchange Get Mailbox Sizes By Mailbox Type

This post is really just for my own records because I use these all the time; my higher-ups like to know who has giant mailboxes.
And since my Exchange environment is in a Resource Forest, I have every kind of mailbox imaginable - Linked, User, Room, Archives...

So I have these PowerShell cmdlets at the ready to quickly grab that info when I need to send it to the bosses.

Fire up the Exchange Management Shell (EMS) and run any of the following, depending on what info you need.

Shared Mailboxes:

Get-Mailbox -RecipientTypeDetails shared | Get-MailboxStatistics | ft displayname,totalitemsize,itemcount

--To Export a CSV:

Get-Mailbox -RecipientTypeDetails shared | Get-MailboxStatistics | select displayname,totalitemsize,itemcount | Export-Csv C:\Temp\sharedsize.csv -NoTypeInformation

Room Mailboxes:

Get-Mailbox -RecipientTypeDetails roommailbox | Get-MailboxStatistics | ft displayname,totalitemsize,itemcount

--To Export a CSV:

Get-Mailbox -RecipientTypeDetails roommailbox | Get-MailboxStatistics | select displayname,totalitemsize,itemcount | Export-Csv C:\Temp\roommailbox size.csv -NoTypeInformation

Equipment Mailboxes:

Get-Mailbox -RecipientTypeDetails equipment | Get-MailboxStatistics | ft displayname,totalitemsize,itemcount

--To Export a CSV:

Get-Mailbox -RecipientTypeDetails equipment | Get-MailboxStatistics | select displayname,totalitemsize,itemcount | Export-Csv C:\Temp\equipment size.csv -NoTypeInformation

User Mailboxes:

Get-Mailbox -RecipientTypeDetails usermailbox | Get-MailboxStatistics | ft displayname,totalitemsize,itemcount

--To Export a CSV:

Get-Mailbox -RecipientTypeDetails usermailbox | Get-MailboxStatistics | select displayname,totalitemsize,itemcount | Export-Csv C:\Temp\usermailbox size.csv -NoTypeInformation

Linked Mailboxes:

Get-Mailbox -RecipientTypeDetails linkedmailbox | Get-MailboxStatistics | ft displayname,totalitemsize,itemcount

--To Export a CSV:

Get-Mailbox -RecipientTypeDetails linkedmailbox | Get-MailboxStatistics | select displayname,totalitemsize,itemcount | Export-Csv C:\Temp\linkedmailbox size.csv -NoTypeInformation

Archive Mailboxes:

Get-Mailbox | Get-MailboxStatistics -Archive | ft displayname,totalitemsize

--To Export a CSV:

Get-Mailbox | Get-MailboxStatistics -Archive | select displayname,totalitemsize,itemcount | Export-Csv C:\Temp\Archive size.csv -NoTypeInformation

Happy reporting!

1 comment:

  1. What if the most desired document or letter is lost or theft along with the letterbox? The result might be catastrophic sometime! So, it should be the foremost duty to ensure the safety of your documents outside the door. A secure and heavy duty locking mailbox can do this. We were in search of the best secure mailbox

    ReplyDelete