Retrieving Exchange version information

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;

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-ExchangeVersions.ps1. When running the script, it will show all Exchange 2007 ( v8), Exchange 2010 (v14) and Exchange 2013 (v15) 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-ExchangeVersions.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 Gallery here.

Revision History
1.0: Initial release
1.1: Added support for Exchange Server 2013, renamed script to Get-ExchangeVersions.ps1
1.11: Small typo fix
1.2: Added connectivity test, fixed patchless Exchange 2010 output issue

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!

  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 ) {

  3. For Exchange 2016 the $PRODID is 442189DC8B9EA5040962A6BED9EC1F1F\InstallProperties and value of “DisplayVersion”

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