This is basically two posts in one, add logging to your scripts in the script node, and Get Service Windows Info, check if you have any deployments being squashed by too restrictive Services Windows, and remove the service windows if you want to. Why add logging… several reasons, to know what the script did, to have a “paper trail”, and helps with troubleshooting. I’ve added logging to my scripts for accountability as well. I have it log to a network share because I’m not local admin on the boxes I’m running the scripts on, so having a central share to collect the scripts is very important to me when I’m troubleshooting issues.
The reason I wrote this script was because we’ve run into machines that would never run the Upgrade because they would return with a status message “deployment will never run, too restrictive of service window”. We do not check the box on our deployments to run outside of a Service Window, as we want to respect what the Business Unit have said are their approved times to service machines. However there are times when the windows are just too small for the time we’ve specified in our TS, or someone created a local service window manually, using a tool like Client Center, to accomplish a one-off task and never cleaned it up. So I created a script that would read the execmgr.log file, search for a restrictive window issue, then delete them (based on parameters). You can search for Local Service Windows or Server Side (Collection) Service Window and delete those, or choose Delete all service windows. Common Sense Warning: Use with Caution, and Test please. This script is deleting Service Windows which restrict installs / reboots from happening all willy nilly. If you start removing those restrictions… well.. you get it.