Using PowerShell
...
$session = New-Object -ComObject "Microsoft.Update.Session"
$updatesearcher = $session.CreateUpdateSearcher()
$count = $updatesearcher.GetTotalHistoryCount()
$updates = $updatesearcher.QueryHistory(0, $count)
foreach ($update in $updates) {
$out = New-Object -Type PSObject -Prop @{
‘KB’ = [regex]::match($update.Title,’KB(\d+)’)
‘Title’ = $update.Title
‘Description’ = $update.Description
‘Id’ = $update.UpdateIdentity.UpdateId
‘RevisionNumber’ = $update.UpdateIdentity.RevisionNumber
}
Write-Output $out
}
Note: should be improved to consider $update.ResultCode
and $update.Operation
.
$session = New-Object -ComObject "Microsoft.Update.Session"
$updatesearcher = $session.CreateUpdateSearcher()
$searchresult = $updatesearcher.Search("IsInstalled=0")
foreach ($update in $searchresult.Updates) {
$out = New-Object -Type PSObject -Prop @{
'Title' = $update.Title
'KB' = $($update.KBArticleIDs)
}
Write-Output $out
}
Is there a way to list out all updates released for a specific Microsoft Product?