Hi,
Win32_QuickFixEngineering WMI class to list Windows Updates, 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 by Get-Hotfix/Win32_QuickFixEngineering.
Therefore, to get all the updates through WMI and MSI, we may need to use a variety of methods.
1. For Windows Management Instrumentation (WMI)
a. Use the WMIC command in CMD
b. Use Get-WmiObject class in PowerShell
2. For updates from Windows Update, Microsoft Update or Automatic Updates feature
Use the following script in PowerShell
$Session = New-Object -ComObject "Microsoft.Update.Session"
$Searcher = $Session.CreateUpdateSearcher()
$historyCount = $Searcher.GetTotalHistoryCount()
$Searcher.QueryHistory(0, $historyCount) | Select-Object Title, Description, Date,
@{name="Operation"; expression={switch($_.operation){
1 {"Installation"}; 2 {"Uninstallation"}; 3 {"Other"}
}}}
3. For using the Windows Installer (MSI) installation method
This can be done by calling Windows Installer COM interfaces directly or using
Get-MSIPatchInfo Jump cmdlet from the unofficial
Windows Installer PowerShell Jump module.
This article details the above methods:
https://social.technet.microsoft.com/wiki/contents/articles/4197.windows-how-to-list-all-of-the-windows-and-software-updates-applied-to-a-computer.aspx
Hope the above can help you.
Regards,
Yic Lv
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact
tnmff@microsoft.com.