Today I wanted to find the MSI uninstall string for a specific install of Adobe Reader on a remote computer. Seeing as using Win32_Product in WMI queries to look for installed software is not a good idea, and even Microsoft warn against using it, I needed to find an alternative.
This one is fairly long-winded, but it gets the job done. It will search both the 32-bit and 64-bit Uninstall keys in the registry.
"","Wow6432Node" | ForEach-Object {Get-ChildItem HKLM:\SOFTWARE\$_\Microsoft\Windows\CurrentVersion\Uninstall\ | ? {($_.GetValue("DisplayName")) -like "*Adobe*"}}
If you have any suggestions or alternatives, please feel free to post them in the comments.