'How to know the installed Software version in PowerShell
I wanted to know what version of software(say X software) installed in my system with PowerShell. In my case, I wanted to know what version of Service Fabric SDK installed in my system with PowerShell.
Solution 1:[1]
if your process/software is run , use this command :
Get-Process -Name "xsoftware" | Format-list -Property ProductVersion
Solution 2:[2]
This link highlight very well what the issues are with using the WMI approach and then outlines a solution for using the registry. The way he does the registry also allows for calling it against remote machines.
https://mcpmag.com/articles/2017/07/27/gathering-installed-software-using-powershell.aspx
Solution 3:[3]
In our case, we needed to verify if MongoDB was installed on multiple servers, and if so, what version. We used a simple PowerShell command and pushed it out multiple servers via Ansible/AWX. Here's the command:
Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object {$_.DisplayName -like "*MongoDB*"} | Select-Object DisplayName, DisplayVersion, InstallDate | Format-List;
Solution 4:[4]
You can use WMI to get information of an installed product. To do this filter by the Name. For example, to get information of Word:
$product = gwmi win32_product -filter "Name LIKE '%Word%'"
You will then find the version information in the Version property:
$product.Version
NOTE: The WMI lookups can be a bit slow, so be patient!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | saftargholi |
| Solution 2 | Kevin Green |
| Solution 3 | Van Vangor |
| Solution 4 | Sean |
