What’s the deal with my PSWindowsUpdate script?

0
13
Asked By ShinyLeaf12 On

Hey everyone! I'm trying to figure out what's going wrong with my PSWindowsUpdate script. I wrote this script to update Windows and log the process, but even though my logs show success messages, the updates (including a huge 93GB feature update) still show as "Install" in the Windows Update GUI after a reboot. When I click "Install All" in the GUI, it takes about 10 seconds to complete, which makes me think there's some sort of caching issue happening. My script clearly states to install all updates and reboot if necessary, but it seems like that's not happening as expected. Can anyone help me understand what might be wrong?

4 Answers

Answered By FloatingGiraffe29 On

Your issue does resonate with me! I've faced a similar situation where the updates seemed to get installed but didn’t appear right away in the UI. This might just be how the underlying Windows Update API functions with PSWindowsUpdate. Unfortunately, it doesn’t seem like there's a way to force the UI to refresh except to manually check or wait it out. Let’s see if someone has a workaround for us!

Answered By PixelatedSquirrel45 On

It seems like your script is doing everything right, but the feature update might still be getting installed in the background. After a reboot, try double-checking in the Installed Updates section instead of just relying on the GUI. Sometimes it takes a little while for everything to sync up properly.

Answered By WittyOtter73 On

Yeah, the logging is really extensive, but it definitely helps in figuring things out! I hope you find the solution soon, considering you mentioned the feature update is acting all weird. Are you sure that this update is definitely not installing? It could be good to check back later or see if it shows up in Programs and Features after the reboot.

Answered By CleverBanana84 On

It sounds like your script is trying to run Windows Update multiple times without real gains. You could simplify things with just one command: `Get-WindowsUpdate -AcceptAll -AutoReboot -Install -MicrosoftUpdate`. That should cover everything in one go! However, you mentioned you’re running the script as a job—could that be affecting how it behaves? It’s also possible that PSWindowsUpdate does its thing but Windows Update UI is just not catching up with those changes yet.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.