Debloat Windows 11 avec PowerShell comme un Pro

Ce guide s'adresse aux utilisateurs avancés souhaitant maîtriser le debloat via PowerShell. Vous apprendrez des techniques professionnelles pour nettoyer Windows 11 en profondeur.

⚡ Prérequis : Exécutez PowerShell en tant qu'administrateur pour tous ces scripts.

Fonction de debloat réutilisable

function Remove-Bloatware {
param(
[Parameter(Mandatory=$true)]
[string[]]$AppNames
)

foreach ($app in $AppNames) {
Write-Host "Suppression de $app..." -ForegroundColor Yellow
Get-AppxPackage -Name "*$app*" -AllUsers | Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue
Get-AppxProvisionedPackage -Online | Where-Object DisplayName -Like "*$app*" | Remove-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue
}
Write-Host "Debloat terminé!" -ForegroundColor Green
}

Script de debloat complet

# Debloat Windows 11 - Script Pro
# Créez un point de restauration avant !

$appsToRemove = @(
# Microsoft Apps
"Microsoft.BingNews"
"Microsoft.BingWeather"
"Microsoft.GamingApp"
"Microsoft.GetHelp"
"Microsoft.Getstarted"
"Microsoft.Microsoft3DViewer"
"Microsoft.MicrosoftOfficeHub"
"Microsoft.MicrosoftSolitaireCollection"
"Microsoft.MixedReality.Portal"
"Microsoft.People"
"Microsoft.PowerAutomateDesktop"
"Microsoft.SkypeApp"
"Microsoft.Todos"
"Microsoft.WindowsAlarms"
"Microsoft.WindowsFeedbackHub"
"Microsoft.WindowsMaps"
"Microsoft.WindowsSoundRecorder"
"Microsoft.YourPhone"
"Microsoft.ZuneMusic"
"Microsoft.ZuneVideo"
"Clipchamp.Clipchamp"
"MicrosoftTeams"

# Xbox (si non-gamer)
"Microsoft.Xbox.TCUI"
"Microsoft.XboxApp"
"Microsoft.XboxGameOverlay"
"Microsoft.XboxGamingOverlay"
"Microsoft.XboxIdentityProvider"
"Microsoft.XboxSpeechToTextOverlay"
)

foreach ($app in $appsToRemove) {
Write-Host "Suppression: $app" -ForegroundColor Cyan
Get-AppxPackage -Name $app -AllUsers -ErrorAction SilentlyContinue | Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue
Get-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue | Where-Object DisplayName -eq $app | Remove-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue
}

Désactiver Cortana complètement

# Désactiver Cortana via registre
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" -Force | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" -Name "AllowCortana" -Value 0
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" -Name "DisableWebSearch" -Value 1

# Supprimer le package Cortana
Get-AppxPackage -AllUsers *Microsoft.549981C3F5F10* | Remove-AppxPackage -AllUsers

Supprimer OneDrive

# Arrêter OneDrive
taskkill /f /im OneDrive.exe 2>$null

# Désinstaller OneDrive
if (Test-Path "$env:SystemRoot\SysWOW64\OneDriveSetup.exe") {
& "$env:SystemRoot\SysWOW64\OneDriveSetup.exe" /uninstall
} else {
& "$env:SystemRoot\System32\OneDriveSetup.exe" /uninstall
}

# Nettoyer les dossiers
Remove-Item -Path "$env:USERPROFILE\OneDrive" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item -Path "C:\OneDriveTemp" -Recurse -Force -ErrorAction SilentlyContinue

Empêcher la réinstallation

# Bloquer les suggestions et réinstallations
$cdm = "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"
Set-ItemProperty -Path $cdm -Name "ContentDeliveryAllowed" -Value 0
Set-ItemProperty -Path $cdm -Name "OemPreInstalledAppsEnabled" -Value 0
Set-ItemProperty -Path $cdm -Name "PreInstalledAppsEnabled" -Value 0
Set-ItemProperty -Path $cdm -Name "PreInstalledAppsEverEnabled" -Value 0
Set-ItemProperty -Path $cdm -Name "SilentInstalledAppsEnabled" -Value 0
Set-ItemProperty -Path $cdm -Name "SubscribedContent-338388Enabled" -Value 0
Set-ItemProperty -Path $cdm -Name "SubscribedContent-338389Enabled" -Value 0
Set-ItemProperty -Path $cdm -Name "SubscribedContent-353694Enabled" -Value 0
Set-ItemProperty -Path $cdm -Name "SubscribedContent-353696Enabled" -Value 0

Automatisez ces optimisations

Utilisez WindowsBooster pour appliquer ces tweaks en quelques clics

Lancer l'Application