I'm running this script script (as discussed here):
$Session = New-Object -ComObject Microsoft.Update.Session
$Searcher = $Session.CreateUpdateSearcher()
$Searcher.Search("IsInstalled=1").Updates | ft -a Date,Title
However, the Search() method takes up to 10 minutes on some of the machines I'm testing on!
- Why is this so slow? The list in Control Panel -> Programs and Features -> Installed Updates only takes a few seconds.
- Can I make this faster? I'm only looking to see if one particular update is in the list.
- What format is the
"IsInstalled=1"query in? If I make a mistake,Search()returns all updates, which isn't very helpful. Edit: Documentation is here - IUpdateSearcher::Search method