question

Chris-1748 avatar image
0 Votes"
Chris-1748 asked Chris-1748 answered

get-hotfix didn't show exchange hotfix?

hello all,

why didn't show get-hotfix all hotfixe?

 PS C:\Users\sysadm> $wu_session = New-Object -COM "Microsoft.Update.Session" 
 $wu_searcher = $wu_session.CreateUpdateSearcher()
 $wu_searcher.QueryHistory(0,10000) | Where-Object Title -like "*KB5004779*"
    
 PS C:\Users\sysadm> get-hotfix
    
 Source        Description      HotFixID      InstalledBy          InstalledOn              
 ------        -----------      --------      -----------          -----------              
 ex        Update           KB5004752     NT AUTHORITY\SYSTEM  12.08.2021 00:00:00      
 ex        Update           KB4049065     NT AUTHORITY\SYSTEM  02.02.2018 00:00:00      
 ex        Update           KB4486129     ex\Administrator 04.12.2019 00:00:00      
 ex        Security Update  KB4520724     NT AUTHORITY\SYSTEM  04.12.2019 00:00:00      
 ex        Security Update  KB4535680     NT AUTHORITY\SYSTEM  15.01.2021 00:00:00      
 ex        Security Update  KB4576750     NT AUTHORITY\SYSTEM  30.09.2020 00:00:00      
 ex        Update           KB4589210     NT AUTHORITY\SYSTEM  11.03.2021 00:00:00      
 ex        Security Update  KB4601392     NT AUTHORITY\SYSTEM  10.02.2021 00:00:00      
 ex        Security Update  KB5001078     NT AUTHORITY\SYSTEM  26.02.2021 00:00:00      
 ex        Security Update  KB5001402     NT AUTHORITY\SYSTEM  12.05.2021 00:00:00      
 ex        Security Update  KB5005043     NT AUTHORITY\SYSTEM  12.08.2021 00:00:00     

124764-ex.png


windows-server-powershell
ex.png (21.1 KiB)
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.

RichMatheisen-8856 avatar image
0 Votes"
RichMatheisen-8856 answered RichMatheisen-8856 edited

The Get-Hotfix cmdlet returns the same results as running "wmic qfe" from the command line. Both use WMI, and only include update made through the Component Based Servicing. get-hotfix-not-returning-all-installed-kbs.html

To get the Windows Update or MSI stuff you need the code you showed in your 1st three lines of the code sample. To get all the updates, just change the value you're looking for to "*".


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.

Chris-1748 avatar image
0 Votes"
Chris-1748 answered

Hello Rich,

this was my solution
Get-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall*| Where-Object displayname -like "KB5004779"

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.