SIGforum
Anyone good at Windows Powershell?

This topic can be found at:
https://sigforum.com/eve/forums/a/tpc/f/320601935/m/8160082564

January 10, 2020, 12:32 PM
muddle_mann
Anyone good at Windows Powershell?
I want to schedule the log out of my PC workstation.

The command "shutdown -L" will log out of the acct immediately. I want to schedule the command.

I got the shutdown command to work to shut the PC off and use the -s flag and put in number of seconds until shutdown time. Like this:
shutdown –s –t number of seconds

I can't get the -t flag to work with the -l for log out.

Again I'm not talking to a server, I'm scheduling logoff of my workstation PC.

Thanks.



Pissed off beats scared every time…

- Frank Castle

--
Sig P250c, Sig P250
January 10, 2020, 12:48 PM
maladat
https://docs.microsoft.com/en-...ws-commands/shutdown

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

There's probably some schedule command you can use to send the "shutdown /l".
January 10, 2020, 01:51 PM
muddle_mann
Thanks. Couldn't get -t or /t for the time out to work with the -L flag...



Pissed off beats scared every time…

- Frank Castle

--
Sig P250c, Sig P250