Shri
Shri

Reputation: 149

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.

Upvotes: 1

Views: 23997

Answers (4)

Van Vangor
Van Vangor

Reputation: 468

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;

Upvotes: 3

Kevin Green
Kevin Green

Reputation: 1205

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

Upvotes: 0

Sean
Sean

Reputation: 62492

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!

Upvotes: -1

saftargholi
saftargholi

Reputation: 980

if your process/software is run , use this command :

Get-Process -Name "xsoftware" | Format-list -Property ProductVersion

Upvotes: 2

Related Questions