Hello everyone,
I am currently having a problem with my modified version of the ManagePower script, which normally takes the name of the VM as a parameter and then performs the power operation according to a parameter. To fit my needs, I identify the VMs by a unique ID which I put in the annotation field of each VM. The problem with my ManagePower script is that, while it works when it should, i.e. the VM is stopped and I want to turn it on (=> Working ! ), BUT it does not fail when it should, i.e. the VM is stopped and I want to turn it off (=> not working, no error message catched).
I can see in my vSphere Client that the operation is failing (InvalidState error), so why does my script always return True, [] (see script) ?
Thank you very much o/