Share via


PowerShell Tip: Get Installed Updates using Win32_ReliabilityRecords

PowerShell Tip: Get Installed Updates using Win32_ReliabilityRecords

Summary

This TechNet Wiki is to demo the steps to get installed updates from the given computer which is similar to View Installed Updates. This question is posted in TechNet Forum post

Explanation

When it comes to updates, most of us think about Microsoft.Update.Session Object. This retrieves all the KBs. However, the OP mentioned that the requirement is to get View Installed Updates.

Solution

How about using Get-HotFix? Well, it's similar to using Win32_QuickFixEngineering! Check the below screenshot.

So, to meet the OP's requirement we used Win32_ReliabilityClass.

Get-WmiObject -class win32_ReliabilityRecords | 
Select ProductName , SourceName , User , Message

Code tweaked by Kjetil Tonstad

$results = Get-WmiObject -class win32_ReliabilityRecords | Select InsertionStrings -Unique | Sort-Object InsertionStrings
foreach ($result in $results ) {
    Write-Host $result.InsertionStrings
}

Requirements

  • Minimum Supported Client: Windows 7
  • Minimum Supported Server: Windows Server 2008 R2
  • Group Policy Enabled: Configure Reliability WMI Providers
  • Windows Scheduled Task Enabled: RacTask

Enjoy PowerShell!