I ended up with this code below, which seeks the latest component version and parses it:
$proxyHost = $proxy.Server.GetPhysicalHost()
$ProxyComponents = $proxyHost.GetComponents()
$ProxyVersionRaw = $ProxyComponents | Select-Object -ExpandProperty Version | Sort-Object { [version]$_ } -Descending | Select-Object -First 1
$ProxyVersion = "{0}.{1}.{2}.{3}" -f $ProxyVersionRaw.Major, $ProxyVersionRaw.Minor, $ProxyVersionRaw.Build, $ProxyVersionRaw.Revision
$proxyHost = $proxy.Server.GetPhysicalHost()
$ProxyComponents = $proxyHost.GetComponents()
$ProxyVersionRaw = $ProxyComponents | Select-Object -ExpandProperty Version | Sort-Object { [version]$_ } -Descending | Select-Object -First 1
$ProxyVersion = "{0}.{1}.{2}.{3}" -f $ProxyVersionRaw.Major, $ProxyVersionRaw.Minor, $ProxyVersionRaw.Build, $ProxyVersionRaw.Revision
Statistics: Posted by vitalii.fesh — Jun 26, 2024 2:35 am




