I know that almost everything on Windows, like opening any sort of application, can be done from the command prompt or from the Run menu.
How can I put my computer to sleep or shut it down? What is the command for that?
command linerun-dialogshutdownsleepwindows
I know that almost everything on Windows, like opening any sort of application, can be done from the command prompt or from the Run menu.
How can I put my computer to sleep or shut it down? What is the command for that?
Best Answer
You will find
shutdown.exe
to be your friend.Other handy commands see this post:
Sleep Computer (read more at https://superuser.com/a/463652/249349 )
Lock Workstation
Hibernate Computer - see answers by Scott Chamberlain and Eric L.
Restart Computer
Shutdown Computer
EDIT/UPDATE:
It seems that sleeping a computer is problematic if hibernate is turned on.
Copying from other answers:
You can either try PsShutdown or: