I am trying to figure out what are the differences between WUA (Windows Update Agent API) IupdateSearcher and wmic qfe list.
When I use WUA IupdateSearcher I get these updates:
(New-Object -ComObject Microsoft.Update.Session).CreateUpdateSearcher().Search('IsInstalled=1').Updates | Format-Table -AutoSize
And when using wmic qfe list:
wmic qfe list brief
The latter includes updates that the former doesn't and vice versa. Why is that?
For example, KB5007273 appears on wmic but doesn't appear on WUA and vice versa, for example, KB4023057 appears on WUA but doesn't appear on wmic


This post (Windows Update Agents Vs WMIC QFE GET) from @RRUZ should get you started:
And to get a deeper dive, check this article search for installed windows updates using Delphi, WMI and WUA shown in this post Windows API equivalent to "WMIC QFE Get" by @RRUZ:
Additionally for people searching for the way to get all installed updates in the system, which would work for a very wide range of Windows Server Versions (WS 2003 to WS2022 - PS 1.0 or higher) you will need to query both QFE and WUA updates. This might get you duplicate updates so you just got to parse those out.