PowerShell: Get Windows Update History

Need to check which updates have been installed on a machine - for patch auditing, troubleshooting a recent update issue, or confirming a specific KB was applied? This one-liner pulls the installed update history straight from the system.

Prerequisites:

  • Privileges: None
  • Module: Built-in, no import needed

Quick Command:

Get-HotFix | Select-Object Description, HotFixID, InstalledOn | Sort-Object InstalledOn -Descending

Example Output:

Description     HotFixID  InstalledOn
-----------     --------  -----------
Update          KB5095189 7/16/2026 12:00:00 AM
Security Update KB5094126 6/6/2026 12:00:00 AM
Security Update KB5094135 6/6/2026 12:00:00 AM
Update          KB5054156 6/6/2026 12:00:00 AM
Update          KB5087051 6/6/2026 12:00:00 AM
📦
Want all of them at once?
Get every free one-liner from this blog in a single downloadable bundle organized by category, each with full comment-based help. No more copy-pasting one at a time.

How It Works:

  • Get-HotFix queries installed updates and patches on the system - it's built on the same underlying data as the Win32_QuickFixEngineering CIM class, just wrapped in a friendlier cmdlet.
  • Description shows the general category of the patch (e.g. "Update" or "Security Update").
  • HotFixID is the KB number identifying the specific patch - useful for cross-referencing against Microsoft's update catalog or a known problematic update.
  • InstalledOn shows the date the patch was applied.
  • Select-Object trims the output down to just these three properties, since Get-HotFix also returns things like Source (the machine name) and InstalledBy (often blank, since not every update logs who installed it).
  • Sort-Object InstalledOn -Descending orders the list from most recently installed to oldest, which is usually more useful for a "history" view than the default unsorted order.

Pro Tip:

On machines with years of update history, this list can get long. Limit it to the most recent 10 entries, for example:

Get-HotFix | Select-Object Description, HotFixID, InstalledOn | Sort-Object InstalledOn -Descending | Select-Object -First 10