I am in the process of configuring a powershell script to VIM 1.5. The goal of the script is to initiate a graceful shutdown for VMs when running on battery backup. I would like to be able to shutdown/start VMs based on what folder they are in under VMs & Templates in VC.
Basically, what I am looking for is when the script is triggered, a short delay (say 5 minutes), then all the VMs in folder "GroupC" shutdown, then 15 minutes the VMs in folder "GroupB" shutdown, then finally, after 25 minutes the VMs in folder "GroupA" shutdown.
An added bonus would to create a script to run when going back on power, to stop the shutdown script and start any VMs that were shutdown.
Basically, what I am looking for is when the script is triggered, a short delay (say 5 minutes), then all the VMs in folder "GroupC" shutdown, then 15 minutes the VMs in folder "GroupB" shutdown, then finally, after 25 minutes the VMs in folder "GroupA" shutdown.
An added bonus would to create a script to run when going back on power, to stop the shutdown script and start any VMs that were shutdown.