Das entfernen ALLER Windows-Updates von Hand ist sehr mühsam. Die PowerShell schafft hier abhilfe. Das folgende kleine Skript ermittelt alle installierten Windows-Updates und entfernt diese der Reihe nach:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | $hotfixes = Get-WmiObject -Class Win32_QuickFixEngineering | select hotfixid foreach($hotfix in $hotfixes) { $KBNummer = $hotfix.HotfixId.Replace("KB", "") $Kommando = "wusa.exe /uninstall /kb:$KBNummer /quiet /log /norestart" Write-Host ("Removing update with command: " + $Kommando) Invoke-Expression $Kommando While (@(Get-Process wusa -ErrorAction SilentlyContinue).Count -ne 0) { Start-Sleep 1 Write-Host "Waiting for update removal to finish ..." } } |
$hotfixes = Get-WmiObject -Class Win32_QuickFixEngineering | select hotfixid foreach($hotfix in $hotfixes) { $KBNummer = $hotfix.HotfixId.Replace("KB", "") $Kommando = "wusa.exe /uninstall /kb:$KBNummer /quiet /log /norestart" Write-Host ("Removing update with command: " + $Kommando) Invoke-Expression $Kommando While (@(Get-Process wusa -ErrorAction SilentlyContinue).Count -ne 0) { Start-Sleep 1 Write-Host "Waiting for update removal to finish ..." } }