Power Script to Uninstall Application

This is the simple command to execute this task

$app = Get-WmiObject -Class Win32_Product | Where-Object {
$_.Name -match “Software Name”
}

$app.Uninstall()

Copy the above syntax to a text editor, e.g, notepad

The application to uninstall here is EmEditor and this can be run against a whole lot of servers via the run command on AWS and does not require a restart.

 

Open the PowerShell CLI
run the file from the location it is saved and run it. The below is the result that will be dispalyed