UPDATE: The problem below arose because I depended on the help information displayed when I entered shutdown /?
. The command-line help says exactly,
/l Log off. This cannot be used with /m or /d options.
The command-line help is incorrect.
The behavior of shutdown /l
is apparently by design, although if you can set a timeout for actually shutting down or restarting, why not logging off?
Using Win10 Home 1909.
I open CMD. I enter this command:
shutdown /l /t 5
I expect my session to log out in 5 seconds, but instead nothing happens, except the shutdown command displays its full help file as if I had entered shutdown /?
.
If I enter other variants, they all work--for example,
shutdown /r /t 5
causes the computer to restart after 5 seconds.
What's up with this?
Thanks!
shutdown /?
in the CMD window, the documentation says, "/l Log off. This cannot be used with /m or /d options." (I copied and pasted that to be sure I didn't miss anything.) It does not mention /t. So I think I fell victim to a "help bug." On the other hand, I would be glad to credit you with the answer if you want to provide one.