Hi. I’ve done several searches, but haven’t found examples or the MS docs that I can refer to in developing some code that uses the MS Update Session COM object. This question is not PS specific. Let me explain.
Here’s some code that appears in a number of different websites, that offers a way to query the Windows Update service, via the associated COM api:
$Session = New-Object -ComObject Microsoft.Update.Session
$Searcher = $Session.CreateUpdateSearcher()
$Criteria = “IsInstalled=1”
$Searcher.Search($Criteria).Updates | ft -a title
What I’m looking for is guidance on the options available that I can pass on to the Search method (see the $Criteria assignment above).
Searching MSDN is usually a satisfying experience but in this case, I’ve come up empty. Any help?