Actualiser powershell/Winget-Remove-BuiltInApps.ps1
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
# Requires running as administrator
|
||||
# Uninstalling Windows applications via 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"
|
||||
)
|
||||
|
||||
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 ""
|
||||
}
|
||||
Reference in New Issue
Block a user