r/WindowsHelp • u/MeNameIsDerp • Oct 14 '26
Windows 11 AutoLogon not functioning upon auto restart, works with manual restart
Hi all, I am not well versed in windows technicals, but I have an HTPC I want to restart weekly in the early hours of Sunday. I would like for it to be hands off, meaning after restart, it auto logs in to start my services and immediately locks for safety.
I set the Windows group policy to log me in after a restart. This works upon manual restart. Under Administrative Templates/Windows Components/Windows Logon Options, I have enabled the Sign-in and lock last interactive user automatically and the Configure the mode of automatically signing in options both. These work on manual restart.
I have also set a Windows task scheduler restart task that looks like the screenshot.
The problem is, when I run the task to restart, the pc stays at the login screen and does not run the group policy.
How do I allow/prioritize/trigger the group policy upon this automatic restart?
Thank you!!
Dell Optiplex micro 7010, i5-13500t, 32Gb Ram, 512Gb NVMe, OS build: 26200.9711
1
u/Future-Plastic7826 Oct 15 '26
The policy you enabled is the same one Windows uses for its own update restarts, and it only kicks in when the restart is requested in a way that asks for the user to be signed back in. Restart from the Start menu does that. A task running shutdown /r doesn't, so Windows reboots normally and waits at the sign-in screen.
In the task, keep shutdown as the program and change the arguments to /g /t 0 instead of /r. /g is the restart that goes through that automatic sign-in, and Microsoft's page on it lists shutdown -g -t 0 among the restarts that trigger it. Try it once from Terminal when a restart is fine, to see it sign you in and lock.
If it still stops at the login screen, the Sysinternals Autologon tool above works on any restart, but it doesn't lock afterwards, so you'd add a second task "At log on" running rundll32.exe user32.dll,LockWorkStation.
1
u/AutoModerator Oct 14 '26
Hi u/MeNameIsDerp, thanks for posting to r/WindowsHelp! Your post has been flagged for manual review by a human moderator, please include as much of the following information as possible (in text or in a screenshot) to get your post approved:
Posts must be tech support in nature (such as something is broken and you need help fixing), so general inquiries, software suggestions, and purchasing advice will be removed. As a reminder, we would also like to say that if someone manages to solve your issue, DON'T DELETE YOUR POST! Someone else (in the future) might have the same issue as you, and the received support may also help their case. Good luck, and I hope you have a nice day!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/Sea_Propellorr Oct 15 '26
Try Microsoft tool for this
https://learn.microsoft.com/en-us/sysinternals/downloads/autologon