Generate Exchange Server Environment Report

How to generate exchange server environment report using powershell :

This will be the first question when you’re being a Exchange Server administrator. It’s good to have a visual look about the exchange server environment and gives you a concise overview about your exchange server. Even though we have lot of tools like visio,word and many more. Even though you can make such documents, it’s harder to keep them up to date. Also it’ll be a hitch to check the changes in previous documents.

This powershell script is inspired to generate the report automatically about exchange server environment to get the overview. This script is also effective in the exchange server 2003, 2007, 2010 and 2013 servers and database availability groups.

What does the report will consist of :

  • Total Servers per Exchange version & service pack
  • Total Mailboxes per Exchange version & service pack, plus Office 365 remote mailboxes
  • Totals for Exchange roles across the environment
  • A site-by-site breakdown for the following:
    • Mailboxes per site
    • HTTPS FQDNs used for Internal, External and SCP URLs
    • CAS array names
    • Exchange servers, version, update rollup and version, service level, highlighted installed roles, OS version and service pack


  • A breakdown of each Database Availability Group including:
    • DAG name, member count and member list
    • Database information such as
      • Name
      • Mailboxes per database and Average Size
      • Archive mailboxes per database and Average Size only shown if a DB includes Archive mailboxes
      • Database and whitespace size
      • Database and log disk free space percentage
      • Last full backup date/time (new) – only shown if at least one DAG DB has had a full backup
      • Circular Logging state (new) only shown if at least one DAG DB has circular logging enabled
      • Server hosting the active copy
      • List of servers hosting copies and copy count

What are all the things won’t be available :

  • It’ll not generate detailed data about Exchange 2007/2003 CCR/SCC clusters, but these are shown as ClusMBX in the output.

How does it makes it :

  • It uses WMI to retrieve OS information and detect Exchange 2007 clusters and calculate Exchange 2007 database size and Remote Registy calls to get Update Rollup information.

Who can perform this report generation :

  • A normal Exchange administrator should be able to perform these tasks.
  • A domain admin

Powershell command to generate environment report :

Executing the script is straightforward – the only setting you need is to specify where to write the HTML file:

.\Get-ExchangeEnvironmentReport -HTMLReport c:\filename.html

You’re always supposed to mention the directory and html file extension to get it in html document.

If you want it to email the results, the follow parameters are available to allow the report to be sent directly from the script:

.\Get-ExchangeEnvironmentReport -HTMLReport c:\report.html -SendMail:$true

Finally, to schedule the report to be generated nightly, execute with your preferred options and add the -ScheduleAs parameter, for example:

.\Get-ExchangeEnvironmentReport -HTMLReport c:\report.html -SendMail:$true -ScheduleAs:DOMAIN\user

After generating the report, it will attempt to schedule the task and prompt (via schtasks.exe) for the password of the user you have chosen to schedule the report as.

Also i have no warranties to provide with the script.

Exchange Server Environment Report Generator Script Version 1.5.8

[wpfilebase tag=file id=14 /]

Exchange Server Environment Report Generator Script Version 1.5.4

[wpfilebase tag=file id=13 /]