Search criteria for PS to use the Microsoft.Update.Searcher COM object

Welcome Forums General PowerShell Q&A Search criteria for PS to use the Microsoft.Update.Searcher COM object

This topic contains 1 reply, has 2 voices, and was last updated by

 
Keymaster
6 months, 2 weeks ago.

  • Author
    Posts
  • #113851

    Participant
    Topics: 1
    Replies: 0
    Points: 1
    Rank: Member

    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?
    Thanks.

  • #113950

    Keymaster
    Topics: 13
    Replies: 4872
    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

    AFAIK, MS has never really documented all the options. It's not really a PowerShell question, though; it might be worth posting someplace with broader coverage, like ServerFault.

The topic ‘Search criteria for PS to use the Microsoft.Update.Searcher COM object’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort