V1.1 of Exchange Environment Report script available now

imageOver the weekend, I’ve been working on incorporating the many suggestions for improving the Exchange Environment Report script, so a big thanks to everyone who’s found the script useful, found additional uses, reported bugs and suggested additional information that would be useful.

The major new feature with this version is full support for Exchange 2007-only environments, with a similar level of detail. The original version was solely intended to be useful from the Exchange 2010 management shell, so there was some work required to use alternative command parameters. I’ve also used a line of code from an a excellent one liner by Gary Siepser to get the Exchange 2007 database size. As part of the above support, information is also displayed for non-DAG mailbox databases in an Exchange 2010 environment.

In addition, a the following other features have been added:

  • Now only displays the versions of Exchange 2007 and 2010 in use in the green organization section
  • Shows the current Update Rollup, using code based on Bhargav Shukla’s excellent Update Rollups script
  • Average sizes for mailboxes and archive mailboxes on a per-database level
  • Last date/time of full backup (but only if at least one database in each DAG/non-dag list has had a full backup)
  • Circular logging state (again, only shown if at least one database in each DAG/non-dag list has circular logging enabled)

Bugs fixed include checking for Powershell version, improved progress information for large Sites and DAGs, detection for sites with no Exchange servers, no DAGs and a number of changes to the way Database information is collected for Exchange 2007 support.

As well as permissions to Exchange cmdlets and WMI to discover the remote OS and Service Pack, this version also attempts to check the file size of Exchange 2007 databases using WMI ,and attempts to connect to each Exchange server using Remote Registry to check the Update Rollup version.

Just like the previous version this has been tested in multiple Exchange environments including Exchange 2010-only DAG/non DAG, Exchange 2010/2007 mixed and from Exchange 2007, but if you find any more bugs let me know.

So, if you’d like to try out the new version of the script, it’s available for download at the original blog article.

29 thoughts on “V1.1 of Exchange Environment Report script available now

  1. I like your script, but dont understand how to modify it so I can schedule the report to be emailed.
    I never user Powershell, it should be extremely straight forward, but Im missing something.
    I’ve wasted half my day trying to get what should be built into Exchange, thank you for writing this.

  2. Hi Steve,

    I am trying to run your script but am getting the following error:

    [PS] C:\data\tools>.\Get-ExchangeEnvironmentReport.ps1 -htmlreport C:\data\tools\report.html
    You must provide a value for this property.
    + CategoryInfo : NotSpecified: (0:Int32) [Get-MailboxDatabase], DataValidationException
    + FullyQualifiedErrorId : 17966987,Microsoft.Exchange.Management.SystemConfigurationTasks.GetMailboxDatabase

    When I run the ‘Get-MailboxDatabase’ command I do get the results I expect. Any Ideas?
    I am running Exchange Version: 14.01.0218.013. On Server 2008 R2 (Virtual)

    Kind Regards


  3. Hi Steve, how is the total DB size calculated? I tried adding the “Number of Mailboxes” times “Av. Mailbox Size” but it does not equal to total DB size. Is it because of the Dumpster size which is not shown in the report? Please advise.

    • It’s different because the total DB size includes whitespace from deleted messages, mailboxes etc.

      DB size is either physical file size (2007 or earlier), or the reported size (2010) – not the sum of mailboxes.

  4. Steve, you are the man! This worked great for my environment, I am running Exchange 2010 SP1 w/ Windows 2008 R2 SP1. Keep up the good work!

  5. Excellent script. Nested hash tables are a new one for me, been looking for something like that for a while.
    I have already made a few mods which appear to work. Looking at making several more. Not sure if you want feedback on those?

  6. Thanks Steve, this is great. Saves a great deal of time reporting on the environment.

    One note I have is around the edge servers: We have these located in a DMZ, the script picks these up from AD but we get an error when the script attempts to retrieve the WMI info on line 329.

    No major as the report completes but maybe a trap for unreachable servers would tidy this up?

  7. Awesome work, Steve! Especially the column about the whitespace of the databases is very useful. Thumbs up! Cheers


  8. Also, any chance you can include a function in the script to automatically alert us if there is a new version (or do you have Twitter feed we can follow, FB page, something?)

    • I did consider doing that, but I am very wary of having anything that calls out to my website in a script people might run in their production environment.

      For each version I will put a quick post on the blog (and my FB updates are mostly my blog feed too). I’m on Twitter mostly tweeting about Exchange and blog updates as @stevegoodman.


    • Hi Devin,

      I’ve not had a chance to try it against a 2003 test environment yet (so have specifically left out support), but I plan to. I’ll be finding some time to build a few different scenarios (2003+2007, 2003+2010, 2003,2007+2010) over the next week or so because I know that would be a great use case.


  9. Hi Steve,

    I’m logged in as an Administrator account to EMS but cannot get the script to work 🙁 I get the error below. Is there something I need to change somewhere on the server?

    File C:\Documents and Settings\XXX\Desktop\Get-ExchangeEnvironmentReport.ps1 cannot be loaded. The file C:\Documents and Settings\XXX\Desktop\Get-ExchangeEnvironmentReport.ps1 is not digitally signed. The script will not execute on the system. Please see “get-help about_signing” for more details..
    At line:1 char:32
    + .\Get-ExchangeEnvironmentReport <<<< -HTMLReport c:\report.html
    [PS] C:\Documents and Settings\XXX\Desktop

    • Try Set-ExecutionPolicy -ExecutionPolicy Unrestricted from an elevated/Administrator Powershell prompt.

      That’s not great though for security (but lots of people do it), so I would suggest changing it back to it’s original setting (use Get-ExecutionPolicy to check before changing it).

      Maybe it’s time I got a code signing certificate!


      • Cheers Steve… fixed the Digital Signing issue… now getting a new error… 🙁

        Unexpected token ‘SP2’ in expression or statement. At C:\Documents and Settings\XXX\Desktop\Get-ExchangeEnvironmentReport.ps1:15 char:48
        + * Total Servers per Exchange Version (2007 SP2 <<< 2010 SP2)

Comments are closed.