Rebooting / pre-execution actionscript

We run all machines with Windows Update Service disabled via GPO. This requires me to place a pre execution script to change the service to manual. I would like to reboot the computers before the updates take place but if I place that pre execution script after the reboot script, upon reboot, GPO disables the updates again.

Is there a different place I should be rebooting the machine first, before the pre-execution script begins? I am a little light on the adding of tasks if that is what the answer is so please be a little detailed if possible.


You shouldn’t disable the Windows Update service itself, instead configure policies to prevent Automatic Updates.

I would definitely consider the recommendation from @JasonWalker because it doesn’t seem what you are doing is the optimal way.

That said, if you do insist in pursuing it this way, what I would do is write my own “pre- & post-” patching policies. For example, we have such to spike up the CPU utilisation for the client from normal to 25% and back down afterwards (allow it to get through the evaluations quicker) - we keep the “Patch Start” & “Patch End” times in client settings, so we have patching actions running when “Patch Start as time <= now AND Patch End as time > now”; where my patch pre- & post- are respectively “Patch Start as time - 15 * minute <= now AND Patch Start as time > now AND Patch End as time > now” & “Patch Start as time < now AND Patch End as time < now AND Patch End as time + 15 * minute > now”. The end result being: 15 mins before the start of the patch window CPU utilisation goes up to 25%; uses that for the duration of patch window; then reduces is back to normal.