I have a workflow that has a ForEach element that mounts an ISO to CDROM to an array of VMs. This works great. I would then like to reboot this array of VMs. I added another ForEach [reboot vm] element and set the array to be traversed to be my VMs.I set the source parameter to be the VM attribute. I run it and it attempts to work fine, until it hits a VM that is powered off. IT then stops and errors out. You can not reboot a VM that is powered off. I guess I need to check the power state against the array and if the VM is powered off, I woudl like to power it on; if it is powered on, I would like to reboot it. How would I go about this?
Thanks