Install-WindowsUpdate does not refresh update status in GUI
Environment:
PSWindowsUpdate v2.2.1.5
Windows Server 2022 w/Windows Powershell that comes with the OS
Internal WSUS server managed using the Windows Server Update Services management console
Based on the suggestions from this URL: https://serverfault.com/questions/395417/microsoft-windows-install-updates-and-restart-instead-of-install-and-shutdown/825111#825111, I installed PSWindowsUpdate, then used this sequence of commands to check WSUS for available updates, then install them and reboot the server:
Get-WUInstall
Install-WindowsUpdate -AcceptAll -AutoReboot
After the server came back up, I opened the Windows Update panel in the Settings app, and the updates (there were three of them) were still showing as "Pending Install", even though I had watched them get installed before the reboot. So I clicked the button to install all updates, and they immediately went from "Pending Install" status to installed, which I verified by looking at the Update History.
So apparently the Install-WindowsUpdate command is not refreshing the update status when it finishes.