Files
Powershell-Scripts/Utility Scripts/List pending Windows Updates.ps1

8 lines
347 B
PowerShell

$UpdateSession = [activator]::CreateInstance([type]::GetTypeFromProgID("Microsoft.Update.Session",$ServerName))
$UpdateSearcher = $UpdateSession.CreateupdateSearcher()
$Updates = @($UpdateSearcher.Search("IsHidden=0 and IsInstalled=0").Updates)
ForEach($update in $updates){
$UpdateTitle = $update.Title
Write-Output $UpdateTitle
}