Hi, I'm trying to power cycle all the VMs in a particular folder on a schedule. I'm trying to use PHP and the web service to do this but run into problems. Firstly, is there an easier way of doing it without learning Perl? (I'm trying to use PHP which I know).
I've got as far as logging in and being able to return a specific VM, but can't find a way of returning all the VMs in a folder, and then iterating through them.
The code I currently have is (note, this might get edited by the forum software so see attached file):
unset($soapmsg);
$soapmsg=new soapval('_this','SearchIndex','SearchIndex');
$soapmsg='Estates/vm/Servers/buar-srv001';
$result= $c->call("FindByInventoryPath",$soapmsg,$namespace);
I've been using the SDK docs and the MOB at but just can't work out how to iterate through a folder. Using the MOB to browse will list the VMs in a folder OK but I can find what SDK method will return these.
Any advice would be much appreciated!!!!
mark