I created a PowerShell script to scheduld downtime on a server plus it’s services for use with Cluster Aware Updating as a Pre-Updating script.
The next part would be the Post-Updating script which will remove the set downtimes.
However, for some insane reason you need to filter the host, the services linked to it and then loop over all the ID returned so remove them one by one.
Why is this so ridiculous? Scheduling a downtime is as easy as specifying the host in the Uri, and use “child_options = 2”. Why can’t the same be used for remove-downtime?