Skip to content

Instantly share code, notes, and snippets.

@xoner
Forked from Grimthorr/pending-updates.ps1
Created February 18, 2021 12:53
Show Gist options
  • Save xoner/11e03259f5da92b41ff47d3b6bc804e2 to your computer and use it in GitHub Desktop.
Save xoner/11e03259f5da92b41ff47d3b6bc804e2 to your computer and use it in GitHub Desktop.
PowerShell script to list the pending/missing Windows updates.
$UpdateSession = New-Object -ComObject Microsoft.Update.Session
$UpdateSearcher = $UpdateSession.CreateupdateSearcher()
$Updates = @($UpdateSearcher.Search("IsHidden=0 and IsInstalled=0").Updates)
$Updates | Select-Object Title
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment