Sometimes it is necessary to get the version of the installed coolOrange products in powerShell
To get the currently installed version of:
- "powerVault"
- "powerJobs Processor"
- For version 21.0.3 or earlier use "powerJobs"
- "powerJobs Client"
- For version 21.0.2 or earlier use "jobWatcher"
- "powerEvents"
- "powerGate"
- "powerGateServer"
- "powerFLC"
- For version 21.0.3 or earlier use "vaultFLC"
This Code snippet reads the version property of coolOrange Products from the Registry without the build number because it is rarely needed, if you need the build number, simply delete .Substring(0, $version.lastIndexOf('.')) in the last line and output just the variable $version.
Change the variable $product to the name of the coolOrange product from the list above you want to retrieve the version of. In this code the names of the products are case sensitive, they must be written in the same way the are in the list.
$product = "powerGateServer"
$version = (Get-ItemProperty -Path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\coolOrange s.r.l.\$product").Version
$version.Substring(0, $version.lastIndexOf('.'))
The output looks like this:
21.0.1
Remarks
- This also works with beta versions without changing the Name
-
Works with version 18.0 and above
See Also
- Get-Item-Property (MSDN)