How can I track (Powershell, ...) that the lock screen has loaded on a remote Windows server (2016/2019) after a reboot?

AnSo 1 Reputation point
2021-05-12T10:10:53.413+00:00

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:

  1. Manual start of update installation
  2. Manual server reboot
  3. Automatic completion of the installation of updates.
  4. Lock screen

But sometimes the scenario is more complex:

  1. Manual start of update installation
  2. Manual server reboot
  3. Automatic completion of the installation of updates.
  4. Automatic server restart
  5. Automatic completion of the installation of updates.
  6. 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).

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2021-05-13T08:40:35.833+00:00

    Hi,

    You can try checking if the LogonUI.exe process is running.
    https://social.technet.microsoft.com/Forums/windowsserver/en-US/a6cfc1ba-c2f4-4a65-b3a3-7d44b8f5cae4/powershell-to-tell-if-a-computer-is-locked

    Best Regards,
    Ian Xue

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.