A computer, fresh out of the box, has a default setting to put itself to sleep after 10 minutes of inactivity. I prefer to keep computers alive so I can run maintenance scripts after hours without disturbing users. A handy command line tool is powercfg which can be used to set the power options. The easy command is “powercfg -change -standby-timeout-ac 00”. This tells the powercfg command to -change the -standby-timeout when on -ac power (DC would refer to a laptop running on battery) to 00 minutes.
-CHANGE, -X Modifies a setting value in the current power scheme. Usage: POWERCFG -X <SETTING> <VALUE> <SETTING> Specifies one of the following options: -monitor-timeout-ac <minutes> -monitor-timeout-dc <minutes> -disk-timeout-ac <minutes> -disk-timeout-dc <minutes> -standby-timeout-ac <minutes> -standby-timeout-dc <minutes> -hibernate-timeout-ac <minutes> -hibernate-timeout-dc <minutes> Example: POWERCFG -Change -monitor-timeout-ac 5 This would set the monitor idle timeout value to 5 minutes when on AC power.