I have a job that backs up a Hyper-V cluster. It currently has 3 hosts . We just added the 3rd host recently, however I only have licenses for 2 hosts until I can make the purchase in 2 months. I've been manually putting one of the hosts into maintenance mode so that the guests would move to the 2 licensed hosts, but this is a chore. I've looked into setting up Task Scheduler jobs on the 3rd host to disable and eventually re-enable the host, but my backup windows are a bit flexible and I was hoping there was a way to run the scripts as part of the job itself.
I see where I can run a post-job command. I'm guessing a powershell script could be created but I'm not a powershell expert. Also, there isn't an option to run a pre-job command. The backup job is scheduled to run after another job, so I'm guessing I could add a post-job command to that job. Seems kind of messy though. Any ideas?
Thanks in advance.