70

I'm looking to find out if a KB is installed via command line.

jscott
  • 25,114
MathewC
  • 7,147

6 Answers6

70

In addition to systeminfo there is also wmic qfe

Example:

wmic qfe get hotfixid | find "KB99999"
wmic qfe | find "KB99999"

There is also update.exe

Or from powershell, just adjust it for your needs:

Get-WmiObject -query 'select * from win32_quickfixengineering' | foreach {$_.hotfixid}
jscott
  • 25,114
Skrap
  • 748
19

PowerShell 2.0 contains the get-hotfix cmdlet, which is an easy way to check if a given hotfix is installed on the local computer or a remote computer. An example of the basic syntax is

get-hotfix -id KB974332
HBruijn
  • 84,206
  • 24
  • 145
  • 224
raeez
  • 191
  • 1
  • 2
7

run "systeminfo" in a CMD window and it will pull back a load of statistics about your system including what patches are installed.

ccame
  • 1,059
3

Some other possibilities: Grep %windir%\Windowsupdate.log for the KB number. Or use reg.exe to export the corresponding install keys.

Tonny
  • 6,360
  • 1
  • 20
  • 31
1
wmic qfe list /format:htable>C:\PatchList%Computername%.html

Above command will give the output in html format.

Jenny D
  • 28,400
  • 21
  • 80
  • 117
vijay
  • 11
  • 1
0

As someone asked about using wmic at a PowerShell prompt, just use Select-String (or sls).

wmic qfe get hotfixid | sls "KB99999"

Xopher
  • 101