Windows – How to query the system via command line to see if a KB patch is installed

command-line-interfacepatch-managementwindows

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

Best Answer

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}