I want to uninstall a program. There can be several versions of this program installed at the same time. I want to uninstall them with the uninstall string from the registry.
I need to get the subkeys of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall which contain the words "jump client" and "cloud". If the name of the subkey contains these words, then I need to get the Display Name and the Uninstall String. The Display Name also contains these two words.
For example:
I need the Uninstall String and Display Name of "123-Jump Client – 189.38-cloud" and the Uninstall String and Display Name of "245-Jump Client – 184-cloud".
I tried
Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*"|Where-Object {$_.DisplayName -contains "jump client" -and $_.DisplayName -contains "cloud"}
That does not work.
Thanks!