By default in Windows 10 and 11 if you click Start, then the power icon then Shut down Windows does a "hybrid shutdown" that prepares the computer for a fast start-up. When you next start Windows loads your session from disk so effectively you are just unlocking Windows not logging in.
I want to do this from a command prompt, but I cannot find a way to do it. The help for the shutdown command lists an option /hybrid so it seems as though:
shutdown /s /hybrid
should be doing the same as Start, Power, Shutdown but it doesn't. I've tried it several times on my laptop and when powering on the laptop I get the same logon process as after a full shutdown i.e. it takes a (relatively) long time to log on and after logging on my apps have not been restarted.
For clarification: the hybrid shutdown is not the same as hibernate. I can hibernate my laptop using shutdown /h, but this is not what I want to do. The hybrid shutdown is described in this answer from Microsoft, or Googling it returns a thousand hits.
Some more information:
I put a batch file in my Start menu Startup folder containing the command:
time /t >C:\temp\LogonTime.log
so whenever I logon to the PC the time I logged on is recorded. Then I did two experiments:
I clicked Start, power icon, shut down then turned the laptop back on, waited five minutes and logged on. The time recorded in
C:\temp\LogonTime.logwas the time the laptop restarted not the time I logged on. So Windows had logged me back in when Windows started.As above except I used the command
shutdown /s /hybridfrom a command prompt to do the shutdown. This time the time recorded inC:\temp\LogonTime.logwas the time I logged in i.e. five minutes after Windows started.
There may be some confusion over terminology as the terms hybrid shutdown, fast start, etc seem to be bandied around rather loosely, however there is a difference between the two ways of shutting down and my question is how to achieve the same as Start, power, Shut down from the command prompt.
The laptop has a recent install of Windows 11 and I have not messed around with any of the power options, so as far as I know it is still at the default settings.