I have a task to track the readiness of Windows Servers after installing updates. In a simple case, the steps for installing updates are as follows:
- Manual start of update installation
- Manual server reboot
- Automatic completion of the installation of updates.
- Lock screen
But sometimes the scenario is more complex:
- Manual start of update installation
- Manual server reboot
- Automatic completion of the installation of updates.
- Automatic server restart
- Automatic completion of the installation of updates.
- Lock screen
During the "Automatic completion of the installation of updates" phase, all the same services are running as when the lock screen was already displayed. Actually, the question How can I track (Powershell, ...) that the update installation process has completed completely (the lock screen is displayed), i.e. that all stages of "Automatic completion of the installation of updates" have been completed and there will be no more automatic reboots? I've tried tracking the TiWorker process, but after the lock screen appears, TiWorker sometimes keeps running for 5 minutes (acceptable) and sometimes up to several hours (unacceptable).