I have tried different scripts to uninstall some applications. But Nothing works as espected.
For example :
$programName = "Sticky Notes"
$uninstallQuery = Get-WmiObject -Query "SELECT * FROM Win32_Product WHERE Name LIKE '%$programName%'"
if ($uninstallQuery -ne $null) {
$uninstallQuery.Uninstall()
Write-Host "$programName uninstalled successfully."
} else {
Write-Host "$programName not found on the system."
}
returns nothing
Sticky Notes not found on the system.
And the application exist.
Do you have some working scripts in powershell to uninstall applications in windows 11 ?
BR
Jeronimo
