Created
June 15, 2026 02:13
-
-
Save miticollo/72e9a71e3cc93d311fe3e2634682fc65 to your computer and use it in GitHub Desktop.
Logoff from current user when LogonUI.exe exits after OOBE and first logon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <SynchronousCommand wcm:action="add"> | |
| <Order>1</Order> | |
| <CommandLine>powershell.exe -WindowStyle Hidden -ep unrestricted -nop -NonInteractive -c "while (1) { if (! $(gwmi -Class Win32_Process -Filter 'name=''LogonUI.exe''' -ea:SilentlyContinue)) { shutdown /L }; sleep 1 }"</CommandLine> | |
| <Description></Description> | |
| </SynchronousCommand> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment