Friday, 11 September 2015

Exchange message size report

The below script gets the email sizes for each email and whether it is an internal or external email and whether it is inbound or outbound. This is useful when sizing up Exchange deployments where you need to provide the average message size and the number of messages sent per day. It's also useful when you need to determine an appropriate message size limit to set on inbound and outbound external SMTP relays and also on your internal Exchange Hub Transport and Mailbox servers. The script works with Exchange 2007 - 2013 environments and discovers the Exchange servers automatically to pull message tracking logs from all relevant servers.
It provides a CSV with the below columns. 

  • Date
  • Time
  • Sender
  • Recipients
  • MessageType
  • MessageDirection
  • MessageSubject
  • MessageSizeInBytes
  • MessageSizeInMegaBytes

To run the report, ensure that the it is run from the Exchange Management Shell and run as below:

Get-EmailSizeReport -Days 10 -CSVOutputPath C:\EmailSizeReport.csv
The Days parameter specifies how many days back you would like to report for. The CSVOutputPath parameter specifies the location where the CSV report will be stored. You need to ensure you have write access to this path.

1 comment: