This is a quick and dirty PowerShell script to see if the local computer has a particular hotfix installed. It takes one argument; the number of the hotfix.
QueryHotfix.ps1:
$KB = $args[0]
Get-WMIObject -class “Win32_QuickFixEngineering” -namespace “root/CIMV2” | Where { $_.hotfixid -match $KB }
Enjoy.