I'm trying to write a script to make sure a certain hotfix is installed. On one of our test computers running Windows 8.1, get-hotfix
returns an incomplete list of hotfixes:
Yet there are tons of patches showing in the Programs and Features control panel:
All of our other test machines, including others installed with Windows 8.0 and 8.1, work fine. Any idea why this is? How can I get a complete list of hotfixes from Powershell?
Edit: wmic qfe list
only shows the same four hotfixes as get-hotfix
as well.
Best Answer
I believe the
Get-Hotfix
commandlet leverages theWin32_QuickFixEngineering
WMI class to list Windows Updates, but only returns updates supplied by Component Based Servicing (CBS). Updates supplied by the Microsoft Windows Installer (MSI) or the Windows update site are not returned byGet-Hotfix
/Win32_QuickFixEngineering
.You can try using the Windows Update API through PowerShell like in the below example. Give this a shot and let us know if it shows the missing updates.
EDIT: To search through the results, you can use the
Where-Object
commandlet (or aliasWhere
) and filter for a specific hotfix: