i am trying to remove a msu patch
ive tried…
Execute-Process -Path “wusa.exe” -Parameters “/uninstall /KB:$KBID /quiet /norestart”
but the doc shows the quiet switch is not valid using the KB:12345 style
anyone had luck doing this?
i am trying to remove a msu patch
ive tried…
Execute-Process -Path “wusa.exe” -Parameters “/uninstall /KB:$KBID /quiet /norestart”
but the doc shows the quiet switch is not valid using the KB:12345 style
anyone had luck doing this?
I would love to see the answer to this. With Windows Update for Business, I would love the option to remove a previously deployed MSU patch using PSADT!
Here [SOLVED] Silently uninstall a windows update - Windows 10 - Spiceworks
they use DISM to uninstall windows updates.
$ErrorActionPreference = "Continue"
# "19041.867.1.8" = KB5000802
# "18362.1440.1.7" = KB5000808
$UpdateArray = @("19041.867.1.8", "18362.1440.1.7")
foreach ($UpdateVersion in $UpdateArray) {
$SearchUpdates = dism /online /get-packages | findstr "Package_for" | findstr "$UpdateVersion"
if ($SearchUpdates) {
$update = $SearchUpdates.split(":")[1].replace(" ", "")
write-host ("Update result found: " + $update )
dism /Online /Remove-Package /PackageName:$update /quiet /norestart
} else {
write-host ("Update " + $UpdateVersion + " not found.")
}
}
exit 0
Try it and If you need help to convert it to PSADT, i’ll do my best.
I just went with this
Get-WindowsPackage -Online | Where-Object{ $.ReleaseType -like “Update” } | ForEach-Object{ Get-WindowsPackage -Online -PackageName $.PackageName } | Where-Object{ $_.Description -like “KB5006667” } | Remove-WindowsPackage -Online -NoRestart