Last Update: v1.31, June 28th, 2017
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.
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), 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-ExchangeVersions.ps1 looks something like this:
Feedback is welcomed through the comments. If you got scripting suggestions or questions, do not hesitate using the contact form.
You can download the script from the TechNet Gallery here.
Available at the TechNet Gallery.