Controlling when Windows 10 will reboot after a Windows Update
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
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 taskActive Hours
Press Win or click on the Start Menu
Type Active Hours
and click Change active hours
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:
18:00
to 12:00
06:00
to 00:00
There are four triggers that will active the tasks and switch between the two windows:
06:00
18:00
These are the settings for the task: