The most amazing “Exchange 2010 Dashboard Report” Script Monitor

[This is a new version of the script published on 1st May 2014] . Now the script has the following features:

  1. It works with all versions of Exchange [up to Ex2013]
  2. It reports Exchange Office 365 users.

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.

Script Charts

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 vs Backup Since

DB vs Size

MBX vs DBs Mounted

MBX vs Mailboxes

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.

DB Activation

Aggregated Data

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.

HTML Table

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.

Filter

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.

CorpEmailReportSnapshot

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

CorpEmailReportSnapshot2

Download the Full Documentation

Download the script Documentation here:

Email Organization Report v2.4 Description

Download the Script here

Download the script from here : Get-CorpEmailReport_V2.4.9

Examples to run the script

.EXAMPLE
Generate the HTML report and supplying the current directry as a script path to create output files
.\Get-CorpEmailReport.ps1 -ScriptFilesPath .\

.EXAMPLE
Generate the HTML report and supplying the custom directory as a script path to create output files
.\Get-CorpEmailReport.ps1 -ScriptFilesPath C:\MyFiles

.EXAMPLE
Generate the HTML report and Filter by servers that start with “NL”
.\Get-CorpEmailReport.ps1 -ScriptFilesPath .\   -ServerFilter “NL*”

.EXAMPLE
Generate the HTML report and Filter by including only Ex1 and Ex2 servers
.\Get-CorpEmailReport.ps1 -ScriptFilesPath  .\  -OnlyIncludedServers  Ex1,Ex2

.EXAMPLE
Generate the HTML report and Filter by including only Servers that are member of a DAG called “DAG1″
.\Get-CorpEmailReport.ps1 -ScriptFilesPath .\  -InputDAGs  DAG1

.EXAMPLE
Generate the HTML report and use PowerShell Remoting for WMI data collection
\Get-CorpEmailReport.ps1 -ScriptFilesPath .\  -WMIRemoting

.EXAMPLE
Generate the HTML report with SMTP Email option
\Get-CorpEmailReport.ps1 -ScriptFilesPath .\  -SendMail:$true -MailFrom noreply@contoso.com-MailTo me@contoso.com -MailServer smtp.contoso.com

.EXAMPLE
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.

Recommendations

Here some recommendations:

– 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.

Copy Rights

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/ 

Similar Scripts

104 comments on “The most amazing “Exchange 2010 Dashboard Report” Script Monitor

    • Gr8. Tell me what do you think… I used this scirpt in big organizations and they are using it in daily basis to get insight to their Exchange data. Some of them have 10,000 + Mailboxes over 5 data centers. Scripts works fine for them. Of course each one is doing his own (Extra) customization like excluding certain servers,etc

      • I run it in a small enviroment with only 20 databases in a 4 node DAG cluster.
        Some mods:
        I excluded the windows backup service in the
        #Get Exchange services that are automatic and stopped
        …. where {($_.displayName -match “exch*”) -and ($_.StartMode -match “Auto”) -and($_.state -match “Stopped”) ($_.displayName -notmatch “XXX*”) }
        “XXX” is the language dependent displayname of the service.
        I also sort the server names alphabetically and removed the ” GB” and ” MB” from the size and whitespace (better copy to Excel 😉 )
        I runs but I have to test some of the rows, witch do not show values, this week.
        I will test it afterward in a bigger enviroment with some 100 databases.

        The “source script”, Steve Goodman http://www.stevieg.org called (Exchange Environment Report), works in all of our mixed enviroments with Exchange 2007/10
        Your script actually only in 2010. 2013 will also make proboblems. I will see….

        BUT – nice work really!

      • Yes i mentioned that the script works in 2010 Exchange Environment.

        Anyone with scripting skills can benefit from Steve’s and my script additions to get around this. For now, i only wrote the Exchange 2010 version.

      • Cannot remember actually. Good question. I guess when I designed the data structure of in memory data, I used nested hash tables, and sorting was not an option even if the data from powershell was sorted. Now in the new powershell 4.0 there is a new type of hash tables that can be sorted. I am working on a new version of the script with more features and options and will put your post into my consideration indeed.

      • I ran this script on exchange 2010 environment but There is no graph chart only two html report. Please assist how can I get graph chart as shown above

  1. I want to mention one important thing here. i downloaded a script that is written by : Steve Goodman http://www.stevieg.org called (Exchange Environment Report), and i build this script by adding new feature on it like the charts diagram, the Exchange tests, some more details in table views.
    Big credit is given to Steve here, who i have the pleasure of talking to him and learn from him a lot. Please visit his original Exchange Dashboard script here : http://www.stevieg.org/2011/06/exchange-environment-report/

  2. great job dear but I am facing a problem when I tried to schedule it on the task schedule
    what is the Program/Script or argument should be filled on task schedule ,coz i need to run it on EMS

  3. Thank you very much for the script.. Really helpful. But for some reason I don’t get the charts??? Am I missing something?
    This is just some of what I get:
    New-Object : Cannot find type [System.Windows.Forms.DataVisualization.Charting.Chart]: make sure the assembly containing this type is loaded.
    At H:\Scripts\ExchangeHealthReport.ps1:2199 char:36
    + $Chart = New-object <<<< System.Windows.Forms.DataVisualization.Charting.Chart
    + CategoryInfo : InvalidType: (:) [New-Object], PSArgumentException
    + FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand

  4. Great enhancements to the original script. Thank you.

    Is there any way to embed the charts into the body of the report in email….rather than having them as attachments?

    • Didnt try that yet. Remember im using a text to write html and do not have .net environment to help create rich html. Happy you liked it. Dig into the blog and you will find scrip that generate html table for all DAG databases and their location,activation pref., and distribution.

      • Ok…thanks again. I have one further question….is it possible to identify what Update Rollup the Exchange servers are at? The script tells me SP3, but not the UR version. I think Steve’s original script would give that UR version on the CAS/HUB/MB servers (so maybe I can look at it)….but not necessarily the Edge for some reason….

      • I guess from Steve script you can get the RU. I didn’t add it because the html table would be bigger 🙂
        For Edge, remember that those are not domain joined, and you need the security context that is running the script to be admin on EDGE servers.
        I guess this can be done if you create an account in the EDGE with the same name and member of the admin, relax the firewall rules there, and i guess you have to disable SID protection to allow the script context account to act as the local admin on the EDGE.
        Seems complex i know, but will blog about this soon once im back from travel hopefully.

  5. I ran it some days back and it really worked out well with my Exchange 2013 test lab. Amazing! By any chance it is available for Exchange 2007 as well, just a request to see if someone has put in there magic code already. Steve Goodman Exchange environment report works like a charm and very useful and handy all the time. Great one Steve.
    Appreciate your feedback, thanks a lot.

    • Steve’s script works in all environment of course. My version of the script will not work in Exchange 2007 for simple reason. I used a dashboard health to measure the health for DAG servers and give a complete overview about what is going on on your DAG. The script uses every possible test published online, search indexes, perform mail flow simulation and far more.

      Exchange 2007 does not include the concept of DAG so all those tests will not be applicable for Exchange 2007.

      Nevertheless, you can play around the script and do your own validation. You can ask the script to only get Exchange 2007+ servers only, or you can configure the script not to get health checks for Exchange 2007 servers.

      Saying that, i hope i can release before the end of this year, a script that can work across all versions. Hope i can find the time 🙂

  6. Thanks very much for this script, its great!
    Im still learning powershell and I have attempted (and failed) to modify the script so that the charts created are not attached but embedded into the mail message.

    I can’t work out how to do it.

    Is there any way to modify the script so that all the charts (created as JPEG) are embedded so that you dont have to double-click to open the attachment?

    Thanks for the great script!

  7. Awesome script. I love some of the additions and charts.

    Couple of things…..as noted above the Rollups are missing and then the circular logging check is gone. I don’t know if the columns are dynamic sizing or not…but reducing the width of alot of the columns would make room for those missing options again.

    And the second thing was the charts. They have issues with ALOT of databases. these are completely unreadable for us in its current state. Heck can’t even tell what it is for the most part! 🙂 Anyway to make them expand over 2 sheets or more rather than trying to condense them down to a single page?

    Database sizes
    Database vs Mailboxes
    Database Backup

    • good point. I will work in early Q1 next year in an version 2 of the script to work with different versions of Exchange servers and workout the chart notes you suggested.

      I am in the process of blogging about my new function that draw charts using PowerShell. Check the blog in an hour to have a look of Get-CorpChart new function.

      Thanks a lot for your feedback!

    • I have updated my Charts with PowerShell script released today to dynamically expand the chart according to the number of items in the input data.

      So in the next version of the Exchange dashboard, i will use the new chart script version which will solve the chart crowded issue.

  8. Hi Ammar,
    Nice extension to the original script.
    Perhaps you could make the f:\scheduledScripts\Pilot path a variable to save lots of searching when customising?

  9. Hi Ammar,

    Thanks for your effort. It’s really very useful for our environment.
    ***Is it passible mail option for bulk user (2 or 3 smtp address)?***

    & I am getting below the error..

    8. Getting Exchange Databases Health
    … Done collecting info from x1
    … Done collecting info from x2
    … Done collecting info from x3
    Attempted to divide by zero.
    At C:\test\exchangeenvironmentdashboard_v1.ps1:2024 char:61
    + $Average_Archive_size2 = “{0:N2}” -f (($total_Archive_size / <<<< $total_Archive_Count) /1073741824)
    + CategoryInfo : NotSpecified: (:) [], RuntimeException
    + FullyQualifiedErrorId : RuntimeException

    10. Generating Drawings
    Exception calling "FindMaxByValue" with "0" argument(s): "Specified argument was out of the range of valid values.
    Parameter name: startIndex"
    At C:\test\exchangeenvironmentdashboard_v1.ps1:2498 char:77
    + $maxValuePoint = $Chart.Series["Data"].Points.FindMaxByValue <<<< ()
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException

    Exception calling "FindMinByValue" with "0" argument(s): "Specified argument was out of the range of valid values.
    Parameter name: startIndex"
    At C:\test\exchangeenvironmentdashboard_v1.ps1:2501 char:77
    + $minValuePoint = $Chart.Series["Data"].Points.FindMinByValue <<<< ()
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException

    • You can send email to a group instead of adding individual users.

      For the FindMinByValue error, it is the .net assembly having trouble getting the max and min points in the input data… Cannot investigate from here sadly.

      I am scheduling a version two of the script to early this year to have better exception handling and add support for Exchange 2013

  10. Hey man, this is a nice script. I have exchange 2013 in my environment. Have you planning on updating the script to it. I just migrated all my users to 2013 and I’m looking for a report like that.

  11. Hi there, I love your script. Question….the Last Backup column….how is that reported? Is that the number of days from last backup? I need to confirm to my manager.

  12. Hello,
    i found a problem.
    If i want to schedule the script, i can’t find the exchange powsershell.
    So i’had this and after the script found the data from EXCHANGE.

    #Add Exchange 2010 snapin if not already loaded
    if (!(Get-PSSnapin | where {$_.Name -eq “Microsoft.Exchange.Management.PowerShell.E2010”}))
    {
    Write-Verbose “Loading the Exchange 2010 snapin”
    try
    {
    Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010 -ErrorAction STOP
    }
    catch
    {
    #Snapin not loaded
    Write-Warning $_.Exception.Message
    EXIT
    }
    . $env:ExchangeInstallPath\bin\RemoteExchange.ps1
    Connect-ExchangeServer -auto -AllowClobber
    }

  13. Thanx for this helpful script , I just want too know , if I run it during office time, it will impact on slowness or any problem? and other Q is can I rum on over one of CAS-HUB Server?

  14. hi,
    thanks for the script, I have a quick question in regards to emailing the report. I have made all the changes but still not receiving the report?
    is there anything else need to be done?
    regards,
    Fawad

  15. Hi all,
    I’m having trouble with Mailbox Distribution graph (wrong data, 4 mailbox detected over 5k). Ant suggestion?
    great Work,by the way.
    red

  16. Hi,
    I like the script.
    i would like to modify the script in order to solve the following scenario.

    My Exchange environment is part of a forest.
    The script supply information for the total environment servers.
    How do i get an information for CAS/DAG servers named (starting with) “AAA…….” ?

    10x
    P.S

  17. I really love this script, but it takes forever to run in a big environment. Is there any way to limit the report to one site or specify only one DAG?

  18. Just an FYI…you can e-mail multiple addresses without using a group. If you separate the e-mail addresses by a comma for the $EmailTo variable it will add them individually.
    For example, the line would look like this:
    $EmailTo = “user1@contoso.com,user2@contoso.com,user3@contoso.com”
    Great script too!

  19. Thanks ammar, I added this to the script [array]$DBCopies = Get-MailboxServer $Server | Where-Object {$_.name -like “USServerName*”} -ErrorAction SilentlyContinue | Get-MailboxDatabaseCopyStatus -ErrorAction SilentlyContinue
    and $DAGs = [array](Get-DatabaseAvailabilityGroup -Identity “USCORPDAGNAME”)
    Now it retrieves the US Servers only, I added a few tweaks here and there to get the results we need for a daily report but I am really looking forward to your next version of charts….

  20. Ammar Congratulations on your new position!
    Can you point out to me the line in the script where the Databases are put in order? Mine are coming out of sequence now…

    • Well, there is a small wisdom here. The report shows the databases and there is a column showing the activation preference value and another showing backup data and column showing index health.

      In most cases, when you have a problem in Exchange Mailbox server, then those columns will show with alert. Saying that, it makes sense to design the script internal data structure to host databases per server and view them on that order.

      This way, when a mailbox server has a problem say in indexing, then you will see warning on its databases in sequence, giving you as an admin, a great info that those in sequence belong to that specific server.

      I do not know if you got the idea, but this is how the script was designed.

      Sometimes, i just select the whole table and copy it, past it in excel sheet and do further sorting depending on my custom sorting needs.

      Thanks indeed for your congratulations. so kind of you.

      I hope this explain some how why it is hard to change the sorting because of the internal hashtable design in the script.

  21. hello,
    first thank you for this great reporting script.
    i need to now if is possible when i receive the report by email, if i can include the png picture in the body of email and do not attach them?
    thank you

    • Its tricky because there is no browser to download the picture and parse them and we cannot point your email client to the picture browser. Maybe a web developer can tweak this.

  22. Some really nice and useful information on this web site, also I conceive the style and design holds superb features. kefdedkkadcf

  23. Pretty portion of content. I just stumbled upon your web site and in accession capital to assert that I acquire actually enjoyed account your blog posts. Any way I will be subscribing in your augment or even I fulfillment you access constantly quickly. dfgkbeegkeaf

  24. Pingback: Exchange 2013 PowerShell Scripts – A Practical Guide | Just A UC Guy

  25. Pingback: Exchange 2013 PowerShell Scripts – A Practical Guide – Part 2 | Just A UC Guy

  26. Ammar u r the man… I downloaded this script and ran it in my environment and results where phenomenal, I was about to write script similar to what you have done but never thought of things in detail as you did. And as you have already done a great job did not think it could have been any better.

  27. Pingback: Netrix LLC – Exchange 2013 PowerShell Scripts – A Practical Guide – Part 2

  28. Hi Ammar,

    Thank you very much for the wonderful script and thanks to Steve Goodman as well!!! Where are the points in the script and how would I get it to sort the html and chart output by server name then database name when both are in the output or only by one of those when only one is in the output? I would lile to see a sequential server and database ordering by my criteria to make some output reports.

    Thanks to both of you very much for your time, effort and knowledge……

    Kevin

  29. Brilliant Reporting, for the amount of information that I need to keep an eye on in our organisation, this is Perfect, Thank for a Briliant script.

  30. This is an awesome script.. Kudos to Steve for the initial script and to yourself for improvising!

    Just a recommendation.. It would be even better if we can include the charts and DAG layout with the database copy information within the email body itself and not as separate attachments.

    Thanks again for the great job!

  31. Pingback: Netrix LLC – Exchange 2013 PowerShell Scripts – A Practical Guide – Part 2

  32. Pingback: Check Exchange server health | AMAGSMB

  33. Hi,
    This is amazing and very nice.
    For me the only downside is the inability to run on another machine other than an Exchange server. For a scenario in which a machine where I put the script and go get the data remotely to servers is the ideal. In this case you don’t need to install other software or store data in the Exchange Servers.
    Of course this depends on the policies of each enviroment

    • Hi thank you for your comment. I usually have a server i called scripting server with exchange dummy role on it for such senario. The reason why it should be on the same server is the way we identify the version and commands available on the powershell environmwnt

      • Hi thank you for your comment. I usually have a server i called scripting server with exchange dummy role on it for such senario. The reason why it should be on the same server is the way we identify the version and commands available on the powershell environmwnt

  34. Its a very cool script!

    I ran it on a server whose archive mailbox database on a secondary was “failed and suspended”, I was suprised to see no alert on the html report to show that. I would have though showing the copy log queue length and state would be relatively important for most people to look at? (it is for us)

  35. Just wanted to leave a message and let you know that this script worked perfectly, thank you for your hard work.

  36. I ran the script, and it showed errors, but I don’t see the log files. Just to be sure, where are they written and what are they named ?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s