From time to time you'll want to remove an application from your system (say from the Windows App Store) that has appeared on your system without you knowing why, when or how.
You could of course use the Microsoft App store to do this, but who wants to open that nightmare....
Here's how you can find and remove an application (package) from Windows using PowerShell.
$Bloat = Read-Host -Prompt "Supply at least a partial name of the app to remove"
Get-AppxPackage -AllUsers | Where-Object {$_.name -Like "*$Bloat*"} | Select Name, InstallLocation
Get-AppxPackage -AllUsers | Where-Object {$_.name -Like "*$Bloat*"} | Remove-AppxPackage
In my case I wanted to remove some new HP Application called JumpStarts which installed over the evening hours.
Using the above, you'll be prompted for the App name (title bar) or some portion of it so you can search for it, and then PowerShell will remove the application.
This will remove things that don't appear in Add and Remove Programs (Appwiz.cpl).
If you want to uninstall applications that are in Add and Remove Programs you can use this (I haven't refined it as much yet as I was just getting it sorted out)
$SEARCH = 'Advanced IP Scanner 2.5'
$RESULT =$INSTALLED | ?{ $_.DisplayName -ne $null } | Where-Object {$_.DisplayName -match $search }
$RESULT
if ($RESULT.uninstallstring -like "msiexec*") {
$ARGS=(($RESULT.UninstallString -split ' ')[1] -replace '/I','/X ') + ' /q'
Start-Process msiexec.exe -ArgumentList $ARGS -Wait
} else {
Start-Process $RESULT.UninstallString -Wait
}