MathewC Asked: 2011-04-28 03:08:04 +0800 CST2011-04-28 03:08:04 +0800 CST 2011-04-28 03:08:04 +0800 CST How can I query my system via command line to see if a KB patch is installed? 772 I'm looking to find out if a KB is installed via command line. windows command-line-interface patch-management 6 Answers Voted Best Answer Skrap 2011-04-28T03:17:49+08:002011-04-28T03:17:49+08:00 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} raeez 2015-02-23T23:35:16+08:002015-02-23T23:35:16+08:00 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 ccame 2011-04-28T03:12:50+08:002011-04-28T03:12:50+08:00 run "systeminfo" in a CMD window and it will pull back a load of statistics about your system including what patches are installed. Tonny 2011-04-28T05:08:58+08:002011-04-28T05:08:58+08:00 Some other possibilities: Grep %windir%\Windowsupdate.log for the KB number. Or use reg.exe to export the corresponding install keys. vijay 2018-04-29T04:56:42+08:002018-04-29T04:56:42+08:00 wmic qfe list /format:htable>C:\PatchList%Computername%.html Above command will give the output in html format. Xopher 2018-07-31T05:57:04+08:002018-07-31T05:57:04+08:00 As someone asked about using wmic at a PowerShell prompt, just use Select-String (or sls). wmic qfe get hotfixid | sls "KB99999"
In addition to
systeminfo
there is alsowmic qfe
Example:
There is also
update.exe
Or from powershell, just adjust it for your needs:
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
run "systeminfo" in a CMD window and it will pull back a load of statistics about your system including what patches are installed.
Some other possibilities: Grep %windir%\Windowsupdate.log for the KB number. Or use reg.exe to export the corresponding install keys.
Above command will give the output in html format.
As someone asked about using wmic at a PowerShell prompt, just use Select-String (or sls).
wmic qfe get hotfixid | sls "KB99999"