salt
salt copied to clipboard
[BUG] win_wusa.uninstall does not work, /quiet /kb combined no longer supported
Description wusa.exe /quiet /kb combined no longer supported https://stackoverflow.com/questions/43822296/unable-to-uninstall-patch-using-wusa-exe-using-quiet-switch#49287650 https://serverfault.com/questions/111525/how-do-to-uninstall-windows-updates-from-a-prompt-or-ps-in-hyper-v-server/869076#869076
More like a Windows issue, but to report this is no longer working.
Suggestion is to use something like this
$SearchUpdates = dism /online /get-packages | findstr "Package_for"
$updates = $SearchUpdates.replace("Package Identity : ", "") | findstr "KBXXXXXX"
#$updates
DISM.exe /Online /Remove-Package /PackageName:$updates /quiet /norestart
Setup Windows minions
Steps to Reproduce the behavior use wusa.uninstall to remove a kb The command called by the function does not work.
Expected behavior Get the kb removed
Screenshots If applicable, add screenshots to help explain your problem.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)PASTE HERE
Additional context Add any other context about the problem here.
@amalaguti Thanks for reporting this. I've scheduled it for our Sulfur release.
Hey @amalaguti
The above PR makes it easier to uninstall a KB using the win_dism execution/state module. It allows you to just pass the KB number without having to know the actual package name in DISM. I chose to make the changes there as that is where we are working with DISM.
Thanks @twangboy !