I am looking for a way to get windows / computer to be turned off on schedule so kids can not play games all night long, must also keep the computer shutdown / locked for a certain time
Are there any ready-made program with pass word, or is there something built in windows I can use?
While there isn't really a way to keep the computer from powering on, I have come up with a script that will check the time and based on your settings the script will shut the computer down. The script is pretty basic but it could easily be expanded.
First you need to allow powershell scripts to run for this...
Press the Windows key and type powershell, right click Windows Powershell and select run as administrator
Type Set-ExecutionPolicy -Scope LocalMachine
Launch Windows Powershell ISE (press the Windows key and type powershell)
Copy the following code into the top section and save it to your desktop. I named it Restrict-Computer.ps1
Now create a file on your destkop called restrict.txt
Add the following two lines to it Change the #'s to the hours you wish to restrict, the computer will run the time between these numbers
in the example below the computer will stay on between 5am - 1059pm
Now copy restrict.txt and Restrict-Computer.ps1 to C:\Windows
Now press the Windows key and type sche and select "Task Scheduler"
Click "Create Basic Task..."
Give it a name (can be anything)
For the Task Trigger select "When the computer starts"
For Action choose "Start a Program"
For the program type powershell.exe and for the arguments type -f "C:\Windows\Restrict-Computer.ps1"
At the Summary page check the box for "Open the properties..." and click Finish
Under the General tab click "Change User or Group..." button
In the Enter the object type SYSTEM and click check name and OK
Change it to run whether a user is logged in or not and run with highest privileges
Under the Conditions tab uncheck everything under the Power section
Now your computer will power down and won't allow them to use it after hours. Of course if they are tech savvy enough there are ways to defeat this.