Hello @AnykeyNL first things first: thank you for you work!
While using your script I've noticed that my staging machines were not being shut down on Saturday for the whole 24 hours while instead everything was being shut down correctly on Sunday.
It seems that the DayOfWeek array is 0 based and so to fix my issue I just needed to decrease the number we are comparing the day to from 6 to 5.
Hello @AnykeyNL first things first: thank you for you work! While using your script I've noticed that my staging machines were not being shut down on Saturday for the whole 24 hours while instead everything was being shut down correctly on Sunday.
It seems that the DayOfWeek array is 0 based and so to fix my issue I just needed to decrease the number we are comparing the day to from 6 to 5.