Skip to content

Instantly share code, notes, and snippets.

@Timthreetwelve
Created May 26, 2023 00:23
Show Gist options
  • Save Timthreetwelve/838c624fe1f4bdedfea56667778c8e97 to your computer and use it in GitHub Desktop.
Save Timthreetwelve/838c624fe1f4bdedfea56667778c8e97 to your computer and use it in GitHub Desktop.
PowerShell to display Windows Update History
# This is a bare bones PowerShell script that will display Windows Update History
$session = New-Object -ComObject Microsoft.Update.Session
$searcher = $session.CreateUpdateSearcher()
$historyCount = $searcher.GetTotalHistoryCount()
Write-Output "Found $historyCount updates"
$Searcher.QueryHistory(0, $historyCount) | Select-Object Date, Title
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment