Dear Joe Fly, I’ve thrown everything into the mix, I hope at least something helps you. Honestly, it’s just small tweaks left that you can fine-tune now. You’re doing great!
Try the Invoke-WUJob Script:
Use the Invoke-WUJob script from the PSWindowsUpdate module. This script can handle both updates and upgrades and can force a restart if needed.
Install-Module PSWindowsUpdate -Force
Invoke-WUJob -Script {Install-WindowsUpdate -AcceptAll -AutoReboot}
Use the Start-OSUninstall or Start-OSUpgrade Commands:
For upgrades, you might need to use specific commands like Start-OSUninstall or Start-OSUpgrade
Check for Pending Reboots Use PowerShell to check if the system is in a pending reboot state
Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired"
If this key exists, it means a reboot is pending to complete the upgrade.
Force a "Special" Restart, the shutdown command with the /r /o flags to force a restart that includes pending upgrades
shutdown /r /o /t 0
Log What Happens During "Restart Immediately": Use tools like Process Monitor or PowerShell logging to capture what happens in the background when you click "Restart Immediately."
Please click Accept Answer and upvote if the above was helpful.
rgds,
Alex