question

lddj90 avatar image
0 Votes"
lddj90 asked Kirito-8222 published

Get-HotFix not returning all installed KBs

Hi



I can't get a list of all my KB installed on my Windows Server 2016 Datacenter (Version 1607). Two are always missing.



Either PowerShell- (Get-HotFix), CMD-Command (systeminfo.exe) or Control Panel -> installed Updates show all installed Hotfixes.

When I log in and go to Settings (new) -> Updates and Security -> Update History I can see all KB including the missing ones.




My Server is getting its updates via a WSUS Server. On the WSUS Dashboard all seems good and the Server up-to-date.




So I wonder, why are there two Hotifxes missing when I list them by PowerShell, CMD or the old Control Panel? I wan't to make sure all Updates are correctly installed.




windows-server-2016
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DaleKudusi-MSFT avatar image
2 Votes"
DaleKudusi-MSFT answered

Get-Hotfix commandlet leverages the Win32_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 by Get-Hotfix/Win32_QuickFixEngineering.
Reference: Get-hotfix

You could try the solution in this link:
Windows: How to List All of the Windows and Software Updates Applied to a Computer

Best regards.


If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

lddj90 avatar image
0 Votes"
lddj90 answered

Thanks for you quick reply.

 $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"}
    
 }}}


This Powershell script did the trick and showed all hotfixes. It's the same output as Settings (new) -> Updates and Security -> Update History

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Kirito-8222 avatar image
0 Votes"
Kirito-8222 answered Kirito-8222 published

Do you have the same script but for a specific KB and look it on a bunch of remote servers?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.