is there a way to force a computer into sleep mode at certain times?

12,651

I assume you are using Windows, here is a command line that will send the PC to sleep

rundll32 powrprof.dll,SetSuspendState

you could either create a batch file to remotely execute this command on all pc at a certain time using psexec, and then another batch file to send a wol command out when you want them woken up.

Alternatively you could schedule these two functions manually on each machine

Share:
12,651
Ng Zhong Qin
Author by

Ng Zhong Qin

Updated on September 17, 2022

Comments

  • Ng Zhong Qin
    Ng Zhong Qin almost 2 years

    for example, to save electricity. Could you make a domain policy that makes a pc go to sleep between the hours of 9 pm and 6 am. You can always turn it back on. It just goes to sleep unless it's being used or it gets woke up.

    Thank you.

    EDIT: Sorry, they are all Windows machines. XP, Vista, and Windows 7, but mostly XP Pro. Lots of machines.

    • Ƭᴇcʜιᴇ007
      Ƭᴇcʜιᴇ007 over 14 years
      Which OS? Are you only interested in doing this to one or two systems, or a whole bunch of them?
  • Guy Thomas
    Guy Thomas over 11 years
    *** Warning, this command caused my machine to Hibernate rather than sleep.