Get-CorpEmailReport.ps1 V2.4.8 is an Email Organization Report and a great tool for IT Professionals who are working with Microsoft Exchange systems.
This report will get 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 Professional.
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 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 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 indicating a red alarm if a database is mounted on a non-preferred mailbox server.
The script will also present 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 script ships with a new module to handle filtering and scoping your script. Sometimes, you want to get a report for certain DAGs only, so you can use the DAG filter.
Maybe you want to just get information from certain Exchange servers, so 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
Of course the 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 script code is divided to 7 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
Download the Full Documentation
Download the script Documentation here:
Download the Script here
Download the script from here : Get-CorpEmailReport_V2.4.8
Examples to run the script
Generate the HTML report and supplying the current directry 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
How to schedule it?
If you want this script to be run as a schedule task, check my post here showing step by step walk through.
Here some recommendations:
– to learn more about how to schedule the script using task manager, check this post.
– 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. Click here for a nice blog post about this.
– If you have an Exchange Edge Servers and want to the script to access it, see this link.
– If you want to use the SendEmail feature and your SMTP server requires authentication, then locate line 2110:
$smtp = new-object Net.Mail.SmtpClient($smtphost)
and add the following lines below it:
$user = “contoso\username”
$passw = “mypassword”
$smtp.Credentials = New-Object System.Net.NetworkCredential($user,$passw);
$smtp.EnableSsl = $false
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: http://www.stevieg.org/2011/06/exchange-environment-report/