Most amazing Exchange email report
What could be better for Exchange admins that a daily report, showing the health and statistics about their Exchange environment. What could be better than knowing your databases are distributed the way you would like, inside your DAG. How much does it worth, to know the total number of mailboxes severed by each mailbox server. What if you could know the total size of mailboxes, and the average mailbox size in your company. This is what this Exchange email report is all about, and more.
Know add to all this the ability to produce wonderful diagrams, to show you all that information, in a way that you can present to your management or team.
This was the objective of writing this script. I was inspired by the extraordinary script written by the great Exchange expert Steve Goodman. He wrote a wonderful script that is considered the defacto tool to monitor and report on Exchange environment, and he did a great work on updating the script to comply with each new version. I had some communications with Steve as I am using big chunk of this script in mine, with some tweaks, and I added more modules and diagram to the whole thing.
This Exchange email report will get you an organization wide information about your Email infrastructure, from Exchange servers O.S info, service health, up time details, beside Exchange and database highly aggregated information.
Not only will you get a nice Dashboard describing your Exchange, you will get aggregated information about how much resources your email infrastructure is consuming in terms of server count, mailboxes and total storage.
What makes this script unique and outstanding, is the chart module. Nothing more exciting than parsing the output data in sorted nice looking charts. Four charts will be generated after running the script. Each chart is designed carefully to get the information that matters most to IT Professionals.
Chart Module uses a smart algorithm that will get information from your Exchange organization, digest it, and then decide what is the best way to output the chart depending on the number of data items. In this way, you will not get small crowded charts with hard to read data. Instead, the graph dimensions will be scaled dynamically according to the number of items to draw.
DB Activation Preference Table [New]
Have you ever used the product team Exchange calculator, where you input your data and a nice formatted table get generated for all your databases, and their copy distribution, along with the activation preference?
The Exchange email report script is intelligent enough to collect your DAG information, database copy locations, their activation preference, and then generate a similar live dashboard with a colored cell display, indicating a red alarm if a database is mounted on a non-preferred mailbox server. Think about it for a moment. You can in daily basis, see if a database is mounted on a server that is not marked as the preferred mounting candidate for that database. This is powerful I believe.
The Exchange email report script will also present to you, a nicely formatted tables with aggregated information like the mailboxes per type, Exchange servers per role and version, and also mailbox and archives count, sizes and average size.
Scope your script with three Filters [New]
The Exchange email report script ships with a new module to handle filtering and scoping. Maybe you just want get information from certain Exchange servers Now you can use the Server List filter and just write a comma separated list of servers.
Finally, you can use the Expression filter, where you can use the wildcard character (*) to write something like “NL*” to get information from server names started with NL.
Detailed information for Servers and Databases
The Exchange email report script will not be perfect if a detailed information is not presented. The script will start creating HTML tables for all your Exchange servers with all detailed information, including version, OS Info, Roll Up Updates version, Service health, Up Time information and more.
Also, for each database, you will get a detailed information about the database and all its properties with smart thresholds that you can customize.
Easy Script Code Browsing
The Exchange email report script code is divided into seven modules, to make it easy for you to dig deeply into the script code and reach the functionality you are looking for. The script also uses Regions, so if you are using new PowerShell script editor, you will be able to expand each script region separately for better script browsing
You can download the script from Microsoft TechNet Gallery.
Generate the HTML report and supplying the current directory as a script path to create output files
.\Get-CorpEmailReport.ps1 -ScriptFilesPath .\
Generate the HTML report and supplying the custom directory as a script path to create output files
.\Get-CorpEmailReport.ps1 -ScriptFilesPath C:\MyFiles
Generate the HTML report and Filter by servers that start with “NL”
.\Get-CorpEmailReport.ps1 -ScriptFilesPath .\ -ServerFilter “NL*”
Generate the HTML report and Filter by including only Ex1 and Ex2 servers
.\Get-CorpEmailReport.ps1 -ScriptFilesPath .\ -OnlyIncludedServers Ex1,Ex2
Generate the HTML report and Filter by including only Servers that are member of a DAG called “DAG1″
.\Get-CorpEmailReport.ps1 -ScriptFilesPath .\ -InputDAGs DAG1
Generate the HTML report and use PowerShell Remoting for WMI data collection
.\Get-CorpEmailReport.ps1 -ScriptFilesPath .\ -WMIRemoting
Generate the HTML report with SMTP Email option
.\Get-CorpEmailReport.ps1 -ScriptFilesPath .\ -SendMail:$true -MailFrom firstname.lastname@example.org-MailTo email@example.com -MailServer smtp.contoso.com
Generate the HTML report with disabling ViewEntireForest option
\Get-CorpEmailReport.ps1 -ScriptFilesPath .\ -ViewEntireForest:$false
- Start running the script with -OnlyIncludedServers switch at first, so you can scope the script to one Exchange Server at first
.\Get-CorpEmailReport.ps1 -ScriptFilesPath .\ -OnlyIncludedServers Ex1
- Run the script from Exchange Management Console and from an Exchange Server.
- Best condition to run the script is from PowerShell 3.0 and above.
The script is based on Steve Goodman, a Microsoft MVP at the time of writing this document. Steve Script: “Generate Exchange Environment Reports using PowerShell” Version 1.5.8, 2nd Feb 2014, is used heavily as a foundation to build this script.
Steve worked hardly in writing an outstanding script to collect information from all versions of Exchange servers, and get a nicely formatted output. This script extends Steve’s script functionality by adding a lot of functionalities like: new on screen progress, charts, HTML DB Activation output, PowerShell Remoting module, Log files tracking, more aggregated data, new table for Mailbox type, new table for Recovery Databases, threshold options, two new Filter functionality (by DAG names, and by Server names), new module for error handling and logging, more data collected for Exchange and Databases.
A separate communication with Steve has been done to ensure copy rights before releasing this extended script. I encourage you to visit his blog and browse his script.
- It works with all versions of Exchange
- It reports Exchange Office 365 users.