Techibee.com

Check if a application is installed or not using powershell

Use the script at https://techibee.com/powershell/powershell-script-to-query-softwares-installed-on-remote-computer/1389 to get installed software. Using Win32_Product has it’s own set of problems. 

I have seen my colleague writting multi line script to do subjected task in powershell today. Scripts works great but felt why can’t we do it with single line code. After messing up with options, I ended at below command.

Get-WmiObject -Class Win32_Product -Computer <remote-comp-name> | Sort-object Name | select Name

Looks cool and simple right? This command lists all the application installed in a given machine.

Now lets extend the functioanality to check if a particular application exists or not…and this can be done with single command again!!.

Get-WmiObject -Class Win32_Product | sort-object Name | select Name | where { $_.Name -match “Office”}

Happy Learning..,
Sitaram Pamarthi

Exit mobile version