Tuesday, 1 December 2015

Mailbox size report in Exchange

Here’s a handly little script that you can use to get the size of your mailbox and other useful information such as the mailbox quotas.

The script generates a CSV file with the columns below:


  • Display Name
  • Primary SMTP
  • Organizational Unit
  • Email Aliases
  • Total Item Size in MB
  • Item Count
  • Storage Limit Status
  • Use Database Quota Defaults
  • Prohibit Send Receive Quota in MB


How to generate the mailbox size report


1) Download the script from here: https://gallery.technet.microsoft.com/Exchange-2010-2013-2016-cee5e558

2) Open up the Exchange Management Shell then change to the directory where you have downloaded the script

3) Run the script as below:

.\New-MailboxSizeReport.ps1 -CSVPath C:\MailboxSizes.csv

image

Now you should have a CSV file which looks like this when opened up and formatted with Excel:

image

Hopefully this will help you manage your mailboxes.

3 comments:

  1. Throws an error when trying to use this, any suggestions would be appreciated



    [PS] C:\Util\Exchange Migration>.\New-MailboxSizeReport.ps1 -CSVPath "C:\Util\Exchange Migration\MailboxSizes.csv"
    You cannot call a method on a null-valued expression.
    At C:\Util\Exchange Migration\New-MailboxSizeReport.ps1:20 char:17
    + $ProhibitSendReceiveQuota = $mailbox.ProhibitSendReceiveQuota.Va ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull


    ReplyDelete
  2. Throws an error when trying to use this, any suggestions would be appreciated



    [PS] C:\Util\Exchange Migration>.\New-MailboxSizeReport.ps1 -CSVPath "C:\Util\Exchange Migration\MailboxSizes.csv"
    You cannot call a method on a null-valued expression.
    At C:\Util\Exchange Migration\New-MailboxSizeReport.ps1:20 char:17
    + $ProhibitSendReceiveQuota = $mailbox.ProhibitSendReceiveQuota.Va ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull


    ReplyDelete
  3. Nice PowerShell script, it helps to generate exchange mailbox size report but I found good details about exchange mailbox size reporting from http://www.exchangereports.net/ which helps to track and generate email flow reports which are based on sender, receivers, email subject, user, date wise and size wise on multiple server.

    ReplyDelete