2

I want to lock my computer from ssh using psshutdown but it isn't working :/ I tried everything i found on internet but I ended with error

C:\Users\amade>psshutdown -l

PsShutdown v2.52 - Shutdown, logoff and power manage local and remote systems Copyright (C) 1999-2006 Mark Russinovich Sysinternals - www.sysinternals.com

Error locking local system: Access is denied.

DavidPostill
  • 162,382
Smogroove
  • 21
  • 2

1 Answers1

1
  • Locking PC: psexec -s -i 1 \\DESKTOP-TRISK "C:\Windows\System32\psshutdown.exe" -l -t 0. Change DESKTOP-TRISK to your desktop name -> open cmd and type in "hostname", should display your current desktop name.
  • Sleeping PC: psshutdown -d -t 0
  • Shutdown PC: psshutdown -f -t 0

Credits to u/Trisks for finding this solution