#17763.2114 补丁系统KB5005030 (OS Build 17763.2114)
$UpdateArray = @(”17763.2114“)#KB5005030
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
参考资料
https://community.spiceworks.com/topic/2310498-silently-uninstall-a-windows-update