Woody Leonhard's no-bull news, tips and help for Windows, Office and more… Please disable your ad blocker – our (polite!) ads help keep AskWoody going!
Home icon Home icon Home icon Email icon RSS icon
  • Patch Lady – scanning for updates

    Posted on Susan Bradley Comment on the AskWoody Lounge

    Home Forums AskWoody blog Patch Lady – scanning for updates

    This topic contains 15 replies, has 10 voices, and was last updated by  anonymous 3 weeks, 2 days ago.

    • Author
      Posts
    • #233594 Reply

      Susan Bradley
      AskWoody MVP
    • #233602 Reply

      techweenie
      AskWoody Lounger

      Can someone paste the script here?  I don’t want to sign up for one stupid article.

      • #233646 Reply

        ch100
        AskWoody MVP

        Can someone paste the script here?  I don’t want to sign up for one stupid article.

        There is no such thing like free money or free beer.
        What is your contribution to get trained for free?

      • #233649 Reply

        dph853
        AskWoody Lounger

        The only pertinent info displayed after the registration break in the article is the single command to initiate the search for updates within powershell.

        Since it’s Susan’s article, I’ll leave it up to her to post the command here if she wants to.

      • #233680 Reply

        anonymous

        Agree it is too bad you have to give out your information to yet another organization in order to read the Article.

        Remember, if you dont have to pay for the product …. You are the product!

        • #233837 Reply

          anonymous

          Thank you

      • #233700 Reply

        techweenie
        AskWoody Lounger

        For what it’s worth, I’ve been using “UsoClient.exe startscan” from command prompt.  I don’t recall if it starts installing anything, but it definitely scans.  I believe it respects your GPO settings.  Another method from powershell is “(New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()” without the quotes.

    • #233610 Reply

      SteveTree
      AskWoody Lounger

      stupid article.

      Just wondering whether you noticed that author’s name!

      Group A (but Telemetry disabled Tasks and Registry)
      Win 7 64 Pro desktop
      Win 10 32 Home portable

      3 users thanked author for this post.
    • #233613 Reply

      anonymous

      In my opinion it is a better way to use the build-in abilities so that you don’t need to install something. Here is a very short version of a script I use (it’s a version without error handling and company only stuff).

      $SearchResult = $(New-Object -ComObject Microsoft.Update.Searcher).Search(“IsInstalled=0”).Updates

      $Downloader = $(New-Object -ComObject Microsoft.Update.Session).CreateUpdateDownloader()
      $Downloader.Updates = $SearchResult
      $Downloader.Download()

      $Installer = New-Object -ComObject Microsoft.Update.Installer
      $InstallCollection = New-Object -ComObject Microsoft.Update.UpdateColl
      $SearchResult | ForEach-Object -Process { $InstallCollection.Add($_) | Out-Null }
      $Installer.Updates = $InstallCollection
      $Installer.Install()

      2 users thanked author for this post.
    • #233625 Reply

      woody
      Da Boss

      Great to see your byline on CSO!

    • #233650 Reply

      dph853
      AskWoody Lounger

      Thank you Susan for the info. Followed the steps and got results. Will play around some more with your solution and see how it handles updates hidden with wushowhide and various delay settings within windows settings.

      So far seems to be the best solution apart from going back to v1709 and staying there forever. 🙂

      Update:

      The PS command ignores updates hidden by wushowhide and displays them  in the screen output anyways. You will still need to hide any updates that you specifically do not wish to install via windows update. There are no available updates that are newer  than 30 days so I can’t yet test to see if the PS command observes the days to ignore rule in settings – I suspect it doesn’t.

      • This reply was modified 1 month ago by  dph853.
      1 user thanked author for this post.
      • #235516 Reply

        rc primak
        AskWoody MVP

        I was going to ask how this method interacts with wushowhide, the Updates History and other parts of Windows Update. In this thread I’m piecing together some answers.

        -- rc primak

    • #234336 Reply

      abbodi86
      AskWoody MVP

      Windows 10 has built-in WMI provider to scan and install updates since ver 1607
      but they keep changing its properties and methods, and sadly it’s basic and limited

      in latest ver 1809, one can scan for updates like this in powershell:
      $ctr = "IsInstalled=0 and DeploymentAction='Installation' or IsPresent=1 and DeploymentAction='Uninstallation' or IsInstalled=1 and DeploymentAction='Installation' and RebootRequired=1 or IsInstalled=0 and DeploymentAction='Uninstallation' and RebootRequired=1"
      $ci = New-CimInstance -Namespace root/Microsoft/Windows/WindowsUpdate -ClassName MSFT_WUOperations -ClientOnly
      $result = $ci | Invoke-CimMethod -MethodName ScanForUpdates -Arguments @{SearchCriteria=$ctr}
      $result.Updates

      this will return list of available updates with their UpdateID for each, which is helpfull to install specific update alone
      e.g.
      $result = $ci | Invoke-CimMethod -MethodName ScanForUpdates -Arguments @{SearchCriteria="UpdateID='2b270fd4-8f8b-4d4f-ba85-17dace669c55'"}
      Invoke-CimMethod -InputObject $ci -MethodName InstallUpdates -Arguments @{Updates=$result.Updates}

      you can also choose to only download the update for now
      Invoke-CimMethod -InputObject $ci -MethodName InstallUpdates -Arguments @{Updates=$result.Updates;DownloadOnly=$true}

      unfortunately, the scan this way isn’t reflected in Settings page
      and the installed updates will not be listed in Update History

      • This reply was modified 4 weeks, 1 day ago by  abbodi86.
      2 users thanked author for this post.
    • #234861 Reply

      glnz
      AskWoody Lounger

      Was unable to sign up for CSO.
      My Firefox has NoScript and other security. What must I allow to sign up?

      • #235515 Reply

        rc primak
        AskWoody MVP

        During the sign-up, the site is using trackers.  You must turn off all ad blockers, all script blockers and all third-party tracker blockers. For many of us, this is too much of a privacy intrusion to tolerate. This is why I also don’t go to restricted areas of InfoWorld anymore.  Too bad this resource and several others Susan references frequently can’t be posted at less intrusive sites. But everybody has to make a living.

        -- rc primak

        • #235528 Reply

          anonymous

          rc primak (and Susan) – thanks.

          Shame that this CSO website is too difficult to use.

    Please follow the -Lounge Rules- no personal attacks, no swearing, and politics/religion are relegated to the Rants forum.

    Reply To: Patch Lady – scanning for updates

    You can use BBCodes to format your content.
    Your account can't use Advanced BBCodes, they will be stripped before saving.

    Your information:


    Comments are closed.