Files
Windows/powershell/Winget-Remove-BuiltInApps.ps1
T
olivier 64352817f5 Add winget repair helper and remove winget configure --enable prerequisite
Initialize-Winget.ps1 refreshes PATH, re-registers App Installer and
falls back to the provisioned package before exiting with a Store link.
All scripts that call winget now dot-source this helper instead of
failing on a missing winget.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-24 10:54:56 +02:00

39 lines
995 B
PowerShell

# Requires running as administrator
# Uninstalling Windows applications via winget
. (Join-Path $PSScriptRoot "Initialize-Winget.ps1")
Initialize-Winget
$Packages = @(
"Windows Web Experience Pack",
"Xbox",
"Outlook for Windows",
"Hub de commentaires",
"Xbox TCUI",
"Xbox Identity Provider",
"Power Automate",
"Microsoft.MicrosoftStickyNotes",
"Microsoft.BingWeather",
"Microsoft Teams",
"Microsoft OneDrive",
"Microsoft To Do",
"Microsoft Bing",
"Microsoft Clipchamp",
"Application Start Experiences"
)
foreach ($Package in $Packages) {
Write-Host "Uninstalling: $Package" -ForegroundColor Cyan
winget uninstall --name "$Package" --silent --accept-source-agreements --nowarn
if ($LASTEXITCODE -eq 0) {
Write-Host "$Package successfully uninstalled" -ForegroundColor Green
}
else {
Write-Warning "Failed to uninstall $Package (it may already be absent or protected)"
}
Write-Host ""
}