Powershell Script To Remove Windows 11 Bloatware -
# Entertainment bloat "SpotifyAB.SpotifyMusic", "Disney", "Netflix", "AmazonVideo", "Hulu",
Write-Log "Found $($bloatwareApps.Count) target applications for removal" -Color Yellow $removed = @() $failed = @() Remove apps for current user Write-Log "Removing bloatware for current user..." -Color Cyan foreach ($app in $bloatwareApps) try $package = Get-AppxPackage -Name $app -ErrorAction SilentlyContinue if ($package) Remove-AppxPackage -Package $package -ErrorAction Stop Write-Log "SUCCESS: Removed $app" -Color Green $removed += $app
catch Write-Log "FAILED: Could not disable $service" -Color Red powershell script to remove windows 11 bloatware
catch Write-Log "FAILED: Could not remove OneDrive - $_" -Color Red
if ($confirmation -ne 'Y' -and $confirmation -ne 'y') Write-Log "Script cancelled by user" -Color Red exit $bloatwareApps = @( # Gaming bloat "Microsoft.BingSolitaire", "Microsoft.MicrosoftMahjong", "Microsoft.MicrosoftMinesweeper", "Microsoft.MicrosoftSudoku", "Microsoft.MicrosoftJigsaw", "Microsoft.Xbox.TCUI", "Microsoft.XboxApp", "Microsoft.XboxGameCallableUI", "Microsoft.XboxGamingOverlay", "Microsoft.XboxIdentityProvider", "Microsoft.XboxSpeechToTextOverlay", # Entertainment bloat "SpotifyAB
# Social media bloat "Facebook", "Twitter", "Instagram", "TikTok",
$removeOneDrive = Read-Host "`nDo you want to remove OneDrive? (Y/N)" if ($removeOneDrive -eq 'Y' -or $removeOneDrive -eq 'y') Write-Log "Removing OneDrive..." -Color Cyan try Stop-Process -Name OneDrive -Force -ErrorAction SilentlyContinue Start-Sleep -Seconds 2 $onedriveSetup = "$env:SYSTEMROOT\SysWOW64\OneDriveSetup.exe" if (Test-Path $onedriveSetup) & $onedriveSetup /uninstall Write-Log "SUCCESS: OneDrive removed" -Color Green # Entertainment bloat "SpotifyAB.SpotifyMusic"
foreach ($service in $telemetryServices) try Stop-Service $service -Force -ErrorAction SilentlyContinue Set-Service $service -StartupType Disabled -ErrorAction SilentlyContinue Write-Log "SUCCESS: Disabled $service" -Color Green