How to un Install Applications using PowerShell


Hi All,

Below is the sample script for that. Run this in your local desktop.

# uninstall using Below script

$programs = @(“Google Update Helper”, “Java 7 Update 79 (64-bit)”)

foreach($program in $programs){

$app = Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -like "$program" }

Write-Host "Uniinstalling Application $($app.name)"

$app.Uninstall()

Write-Host "UninStall Complete for app $($App.Name)"

}

Make sure to test it in your local /test server first before doing it in other environments.

Regards,

Chaitanya

Leave a comment

Design a site like this with WordPress.com
Get started