Powershell Command/Script to Uninstall Software on a Remote Machine

I have been working this for a couple days now, and no matter how I run this and work it, it seems to uninstall the program via PowerShell and returns the success code:

__GENUS : 2 __CLASS : __PARAMETERS __SUPERCLASS : __DYNASTY : __PARAMETERS __RELPATH : __PROPERTY_COUNT : 1 __DERIVATION : {} __SERVER : __NAMESPACE : __PATH : ReturnValue : 0 PSComputerName : 

This happens with various notoriously difficult to remove software such as McAfee.

The command being used is:

 Get-WmiObject -Class win32_product -Filter "Name like '%McAfee%'" | ForEach-Object {$_.Uninstall()} 

I’ve tried various scripts, solutions on StackOverflow, and variations and nothing works.

submitted by /u/UWSecurityGuy
[link] [comments]

Leave a Reply