Prevent sleep script

Phantom410

Honorable
Nov 5, 2013
68
0
10,660
I need a way to prevent a numerous amount of pc's that are on the lock screen, to go sleep.
Changing the power options within windows does not apply, because no one has log on yet.
Bottom line. When send a wake up signal to all pc's on the classroom. I need them to stay on on the lock screen.

Win 10 Machines
 
Log in as the primary administrator account and that account's power settings applies for when the PC is not logged in.

If these computers are in a windows domain you would set it in group policy

If you are dead-set on the script then just have a timer script that runs a command every minute so that way it wont go to sleep.
Then just set it up in task scheduler for when the system boots up before anyone even logs on.
You would have to set another scheduled task to kill the process otherwise it would continue to run after a user logs in.