Uninstalling Windows Hotfix via C# or PowerShell

Kevin Horvat picture Kevin Horvat · Dec 11, 2015 · Viewed 10.6k times · Source

In our Company we need to uninstall a Windows Hotfix thats installed on the System. I've done a PowerShell Script that checks if the specified Update (Lookup via KBArticleID) is installed or not and then reports this via Textfile to the Server.

There is a Windows built-in Tool called WUSA (Windows-Update-Standalone-Installer) that allows to uninstall Updates with a specified KB-Article-ID. The Problem is that under Windows 7, 8.1 and 10 the WUSA-Tools only works in normal interactive Mode and not in the quiet Mode that we need. I'm running like this:

wusa.exe /uninstall /kb:3114409 /norestart /quiet

As described the Problem is that this command will only run in Interactive Mode and not Quiet. Do you have any solutions or hints? I would prefer to implement this via PowerSehll or C# but other Solutions are welcome too :)

Thanks for your help!

Answer

Tommy picture Tommy · Nov 17, 2016

Old post, but the heck.. I tried this on a windows 2012 R2 server and it worked: Start-Process wusa.exe -ArgumentList '/KB:3170455 /uninstall /quiet /norestart' -Wait