Get-HotFix not returning all installed KBs

lddj90 36 Reputation points
2020-12-09T12:17:16.957+00:00

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
Windows Server 2016
A Microsoft server operating system that supports enterprise-level management updated to data storage.
2,379 questions
0 comments No comments
{count} votes

Accepted answer
  1. Dale Kudusi 3,211 Reputation points
    2020-12-09T14:44:40.783+00:00

    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.

    2 people found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. lddj90 36 Reputation points
    2020-12-10T12:48:09.11+00:00

    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

    0 comments No comments

  2. Kirito 1 Reputation point
    2021-07-24T17:47:55.553+00:00

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

    0 comments No comments