Retrieving Exchange version information

Last Update: v1.33, October 22nd, 2018

At some time you may want to create an overview of the current Exchange servers in your organisation and the current product levels. The attribute you initially might look at is AdminDisplayVersion, but unfortunately AdminDisplayVersion doesn’t reflect installed roll-ups.

The location that does contain update information is in the registry, more specific the installer subkey related to the installed product. The exact key you should be looking for is depends on whether Exchange Server 2007 or Exchange 2010 is installed. The path is HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\$PRODID\Patches\, where $PRODID is:

  • 461C2B4266EDEF444B864AD6D9E5B613 for Exchange 2007.
  • AE1D439464EB1B8488741FFA028E291C for Exchange 2010 or Exchange 2013.
  • 442189DC8B9EA5040962A6BED9EC1F1F for Exchange 2016 or Exchange 2019.

Here subkeys may exist for each applied roll-up.

Looking at the DisplayName we see it contains a full description of the roll-up, prepended with the related Exchange version. Distilling that information using a Powershell script should provide us with the required information.

Below you will find the script, Get-ExchangeVersion.ps1. When running the script, it will show all Exchange 2007 ( v8), Exchange 2010 (v14), Exchange 2013 (v15.0) and Exchange2016 (v15.1) servers with version information, but it will skip Edge server (due to potential firewall issues) or ProvisionedServer (‘server’ is a placeholder).

The output ($output) is sent to the console. You can easily make the script report to a CSV file by removing the comment in front of the line containing the export-CSV cmdlet. The output of Get-ExchangeVersion.ps1 looks something like this:

Feedback
Feedback is welcomed through the comments. If you got scripting suggestions or questions, do not hesitate using the contact form.

Download
You can download the script from the TechNet or from GitHub.

Revisions
Available at the TechNet Gallery.

5 thoughts on “Retrieving Exchange version information

  1. Very helpful. I needed a way to determine which of my Exchange 2010 SP1 machines have been updated to UR 1, since the version number doesn’t change.

    Minor correction: I think the $PRODID for Exchange 2010 is AE1D439464EB1B8488741FFA028E291C (which your screenshot and script shows, but the text doesn’t). Once I figured that out the rest was simple. Thanks for the tip!

    Like

  2. When running your script in a co-existence environment with Exchange 2003 servers, it simply fails because it can’t handle Exchange 2003 servers. To allow it to run against the Exchange 2007 and Exchange 2010 servers, I modified your script by changing the following line:

    Get-ExchangeServer | ForEach-object ( $Server ) {

    to:

    Get-ExchangeServer | ?{$_.AdminDisplayVersion -like “Version 8*” -or $_.AdminDisplayVersion -like “Version 14*”} | ForEach-object ( $Server ) {

    Like

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.