2

Having an issue that I cannot seem to find any information on.

I'm using the Get-WindowsUpdate and Get-WUList modules in PowerShell to attempt to download and install Windows updates.

$windowsUpdateStatus = Get-WUList
while($windowsUpdateStatus.Value[0].Message -ne ""){
   Get-WindowsUpdate -Download -MicrosoftUpdate -AcceptAll -Install -AutoReboot
   $windowsUpdateStatus = Get-WUList
}

*Note that the conditionals in the script block above may not be 100% accurate

When this runs I can see that a handful of updates are installed in the console however when I go to the Windows Update UI it still shows the updates that were previously installed via the Get-WindowsUpdate call still need to be installed.

I've done checks with the Get-WUHistory and all other commands and they also show that the update is installed.

Has anybody else encountered this issue and is there a way to force that Windows Update GUI to refresh (other than by clicking the "Install Now" button)

12
  • What happens if you also run usoclient scaninstallwait this command should refresh the GUI. This can be run both from powershell or command prompt.
    – LPChip
    Commented Oct 19, 2023 at 14:13
  • 1
    @RussellLMiller How about usoclient startinteractivescan? Commented Oct 21, 2023 at 20:58
  • 1
    @Vomit IT - That seemed to do something. Unfortunately none of the machines are in a state where they have updates to install. Once I see the same issue I will try and report back but this does seem promising. Thank you! Commented Oct 23, 2023 at 12:24
  • 1
    Yes, I believe it might be drivers and you have to run these sort of commands but see comments in the code too in case it's still applicable from when I ran that in the past: pastebin.com/rvxnwnWA. Also, look over the logic in my answer here: superuser.com/questions/1766039/… and consider some of that or those commands but in particular, the lines that removes: "c:\windows\SoftwareDistribution" as sometimes you have to stop WU service, purge that, start back up, check for updates again. Commented Oct 31, 2023 at 15:05
  • 2
    Does this answer your question? Windows Update stuck on Checking for updates
    – Ramhound
    Commented Nov 7, 2023 at 21:12

1 Answer 1

0

Credit to VomitIT for this.

usoclient startinteractivescan

There are some edge cases but in general this worked!

1
  • What does that do? Could you cite a URI? Commented Jul 14 at 16:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .