NetXMS Support Forum

English Support => General Support => Topic started by: Bernhard on August 10, 2021, 09:52:42 AM

Title: Collecting Exchange Build number (long format)
Post by: Bernhard on August 10, 2021, 09:52:42 AM
Hi,

is it possible to collect the Exchange version including build number of security patch?
Based on the following link, the full version number can be queried with "Get-Command Exsetup.exe | ForEach {$_.FileVersionInfo}" in the PS console
https://docs.microsoft.com/en-us/exchange/new-features/build-numbers-and-release-dates?view=exchserver-2019#exchange-server-2013

PS: The following data collection shows only the CU version, without security patch level:
   table = AgentReadTable($node, "System.InstalledProducts");
   colNameIndex = table->getColumnIndex("NAME");
   colVersionIndex = table->getColumnIndex("VERSION");

BR,
Bernhard
Title: Re: Collecting Exchange Build number (long format)
Post by: Victor Kirhenshtein on August 27, 2021, 10:25:18 AM
Hi,

you can create external parameter that will execute this command and return security patch number, something like

ExternalParameterShellExec = ExchangePatchNumber:pwsh -Command "& { Get-Command Exsetup.exe | ForEach {$_.FileVersionInfo} }"

in nxagentd.conf (not sure about exact PowerShell syntax, but you should get an idea). Agent will provide new metric ExchangePatchNumber that should return output of given command as value.

Best regards,
Victor