Hi Sir/Ma’am,
I’m a new guy here. Just want to know if there’s an existing script on how to set the Windows Update Change Active Hours and Restart Options on Windows 10?
Appreciate your response here.
Thanks!
Vin
Hi Sir/Ma’am,
I’m a new guy here. Just want to know if there’s an existing script on how to set the Windows Update Change Active Hours and Restart Options on Windows 10?
Appreciate your response here.
Thanks!
Vin
Hi @Prabakaran
Thanks.
If possible the time would be time for Windows Active Hours Start 10:00 AM and End to 10:00 AM and Restart Option time is 10:00 PM
Regards,
Vin
Please see the attached JSON file. This script is configurable via parameters; run this as LocalSystem User, click “Configure Parameters”, and enter the time values accordingly, then click Apply and run against the endpoint(s) you wish to configure.
Note that you can only set active hours to a maximum of an 18 hour window starting with Windows 10, version 1703. I have set the default values to 10:00 AM, 10:00 PM, and a restart tune of 10:00 PM as per your request.
Hope this helps and have a great day,
Kristan
20181112-Configure-Windows-Update-Active-Hours-and-Scheduled-Update-Time.json (3.89 KB)
Hi @Kristan
Thanks appreciate your response here.
Will upload it and see what will happen to our devices.
Regards,
Vin
Sometimes the Windows Update UI does not match the registry settings. Try restarting the endpoint and manually check for updates after running the script, you should see the “* Some settings are managed by your organization” notice appear meaning that the active hours are being enforced.
Hi @Kristan,
I did some checking and this what i’ve found on the execution logs
MY PC
2018/11/13 09:12:39 AM | Finished success | The operation completed successfully. The operation completed successfully. Updating policy... Computer Policy update has completed successfully. User Policy update has completed successfully. The computer must be restarted for the changes to take effect. |
2018/11/13 09:12:27 AM | Started | Procedure parameters: ActiveHoursStart string ActiveHoursEnd string ScheduledInstallTime string |
POS PC
Finished success | The computer must be restarted for the changes to take effect. | |
2018/11/13 12:42:08 PM | Started | Procedure parameters: ActiveHoursStart string ActiveHoursEnd string ScheduledInstallTime string |
Just want to know if there’s something need to be done on the POS PC so that it can be executed properly.
Thanks.
Regards,
Vin
You should see the values for the parameters listed in the Execution Log; both of your logs are missing those values meaning something hasn’t worked properly.
Ensure that the values for ActiveHoursStart, ActiveHoursEnd, and ScheduledInstallTime are specified in 24-hour values; for your use case you should be able to set these to 10, 22, and 22 respectively which equals 10:00 AM - 10:00 PM for active hours, and 10:00 PM for install time. Also double check to make sure that it’s run as LocalSystem User as the currently logged on user may not have the correct permissions to set Windows Update policies via the registry.
Hi @Kristan
Is there a work around how to make the script works? i’d run the procedures as localsystem user several times but still no luck. hope you can help me to solve this problem.
Hi @Kristan
I did copy one of the line on the script and pasted it at dos command prompt here’s what i’d got. Kindly see the attachment.
Thanks.
Hi Kristan,
I did some changes on the parameters. from string i change the value to integer, do you think this would work?
2018/11/14 03:35:09 PM | Finished success | The operation completed successfully. The operation completed successfully. The operation completed successfully. The operation completed successfully. The operation completed successfully. Updating policy... Computer Policy update has completed successfully. User Policy update has completed successfully. The computer must be restarted for the changes to take effect. |
2018/11/14 03:34:57 PM | Started | Procedure parameters: ActiveHoursStart integer 10 ActiveHoursEnd integer 22 ScheduledInstallTime integer 22 |
Regards,
Vin
Based on the output it looks like it should work with the settings that you have, not sure why it’s working on my end but not yours perhaps something is getting lost on import/export.
I modified the script to hard code the values that you’re looking for, run as LocalSystem User and it doesnt require the parameters
20181114-Configure-Windows-Update-Active-Hours.json (2.91 KB)
Hi @Kristan,
Thanks. Will check try to run this procedure. I’ll let you know what’s the result.
Regards,
Vin