Are you sure the resulting object has a method named uninstall()? Alternatively you could use Invoke-Command. Read the complete help including the examples to learn how to use.
I’d avoid Win32_Product. It’s not very well coded, and although I’m not 100% sure why, querying it causes anything registered therein to be reevaluated. This integrity check can actually break things from time to time, and is both hard disk and processor intensive, completely unnecessarily.
Instead, query the registry locations for uninstall strings and execute them.
Another pain point of Win32_Product is that it simply doesn’t list everything you may need. Adobe Acrobat may simply not exist in that class – which is probably why you’re getting the error you’re getting; Get-WmiObject returns $null when it doesn’t find anything.
Agreed on the Win32 class.
That whole Adobe this was just what I used as an example for locate and remove safely. The OP never listed the software they tried to hit.
Thank you for the replies.
I have been tasked with removing various unsupported software packages that is on our network.
Trying to simplify software removal.