If this helps you, don't forget to leave a Github Star and upvote at StackOverflow https://superuser.com/a/1456571/351521
You can control the time which you allow Windows to automatically reboot per Windows Update operations without disabling anything or forcefully stopping the Windows Update service.
This script will not prevent any Windows Updates from being downloaded or installed ever so OS security patches will still be applied to the system ― you just have it reboot when you're ready.
Pull requests and Issues are welcome!
If this project is useful to you, don't forget to leave a Github Star
You can also Buy me a coffee ☕
-
Download the setup.ps1 script
-
Open PowerShell as Admin
-
Navigate to the downloaded script directory
-
Run
Unblock-File .\setup.ps1
-
Run
Set-ExecutionPolicy RemoteSigned -Scope Process
-
Commands:
.\setup.ps1
: install the scheduled task.\setup.ps1 -run
: manually executes the scheduled task.\setup.ps1 -uninstall
: uninstall the scheduled task
-
Press Win or click on the
Start Menu
-
Type
Active Hours
and clickChange active hours
- The current settings are displayed below
Change active hours
This scripts is based in this answer from StackOverflow: https://superuser.com/a/1208866/351521
This script creates a scheduled task that dynamically sets the Active hours
settings for Start time
and End time
based on the run time it's executed while ensuring to increment the values to always be hours ahead.
The task will be created at \Win10ActiveHours\Update
There are two Active Hours
windows of 18 hours:
- from
18:00
to12:00
- from
06:00
to00:00
There are four triggers that will active the tasks and switch between the two windows:
- at computer start up
- at computer wake up
- daily at
06:00
- daily at
18:00
These are the settings for the task:
- wake to run
- start when available
- don't stop on idle end
- allow start if on batteries
- don't stop if going on batteries