Uninstall software from multiple computers
To uninstall software from multiple computers you must determine the name of the software you want to uninstall.
Get the list of installed applications from a computer:
1 |
Get-WmiObject -Class Win32_Product | select name |
If you want to see the programs on a remote computer user the -computername option.
Find the program you want to uninstall, for example “Sophos Patch Agent” from 3 computers:
1 2 3 4 5 6 |
$collection = 'wks001','wks002','wks003' foreach ($item in $collection) { $app = Get-WmiObject -Class Win32_Product -Filter "Name = 'Sophos Patch Agent'" -ComputerName $item $app.Uninstall() } |
This will uninstall the software (one at a time) from the computers.