Skip to content

Instantly share code, notes, and snippets.

@df-a
Forked from Grimthorr/pending-updates.ps1
Created March 26, 2024 01:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save df-a/ae1bec1c1f4f17f32f02327da50a7b26 to your computer and use it in GitHub Desktop.
Save df-a/ae1bec1c1f4f17f32f02327da50a7b26 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