19

I'm having an issue on my server when working with my VM guests, and I think its due to a recently installed update. What is the correct command to uninstall Windows Updates from either the command prompt, or Powershell?

DanBig
  • 11,393
  • 1
  • 28
  • 53

5 Answers5

28

To obtain a list of installed patches you can do:

wmic qfe list

To uninstall a listed patch, you do:

wusa /uninstall /kb:<kbnumber>

Here are some links with more information: http://www.systemcentercentral.com/BlogDetails/tabid/143/indexid/57960/Default.aspx http://support.microsoft.com/kb/934307
http://technet.microsoft.com/en-us/library/dd883262(WS.10).aspx

Note: the 934307 KB article says that you can't use /uninstall on Windows 2008 - this does not apply to Windows 2008 R2 - they enabled the uninstall switch on R2 (see the last link).

MattB
  • 11,124
  • 1
  • 29
  • 36
7

Since I just ran into this, and it's not clear from the documentation, when using wusa /uninstall /kb:<kb number> make sure you're using the actual number from the KB, not the number and the KB.

Wrong: wusa /uninstall /kb:KB123456

Right: wusa /uninstall /kb:123456

Jeff Mergler
  • 145
  • 8
DigitalNoise
  • 71
  • 1
  • 1
3

And to do it from a remote computer : wmic /node:SRVNAME process call create "powershell wusa /uninstall /kb:2639043 /quiet /norestart"

and wusa /? to have more information on parameters

Lucs
  • 31
  • 1
0

Try this in CMD or PS

wmic qfe list brief /format:table
0

On Windows 10 the /quiet no longer works. You may use:

$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

see: https://social.technet.microsoft.com/Forums/windows/en-US/f6594e00-2400-4276-85a1-fb06485b53e6/issues-with-wusaexe-and-windows-10-enterprise?forum=win10itprogeneral

city
  • 63
  • 3