-1

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!

3
  • 2
    As per the microsoft Documentation, /l may not be used with /t or /m switches
    – T3RR0R
    Commented Jun 12, 2020 at 21:50
  • 1
    Yep, the timer switches only work with shutdown, sleep, hibernate (not all versions) and restart.
    – user1019780
    Commented Jun 12, 2020 at 21:51
  • @T3RR0R I see that in the documentation you referenced. However, I would like to point out that if you enter 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.
    – vknowles
    Commented Jun 13, 2020 at 2:24

1 Answer 1

0

My problem with the shutdown command arose because I depended on the help information displayed when I entered shutdown /?.

The command-line help says exactly (copied and pasted from the CMD window),

/l Log off. This cannot be used with /m or /d options.

The online documentation says,

/l Logs off the current user immediately, with no time-out period. You cannot use /l with /m or /t.

The command-line help is incorrect regarding the use of the /t switch.


The two sources are also inconsistent regarding the use of the /d switch, but I don't know which one is correct.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .