I found sample code in the communities, but it appears that the searches are case sensitive. We need help modifying the script to make it case insensitive.
var vms = VcPlugin.getAllVirtualMachines(null, "xpath:name='"+vmName+"'"); var vmObject = null; if (vms != null && vms.length >0){ System.log("VMs Found: " + vms.length); if (vms.length == 1){ System.log("Match found for vm named: "+vmName); vmObject = vms[0]; }else{ System.log("More than one VM found with that name! "+vmName); for each (vm in vms){ System.log("VM ID: "+vm.id); } } }else{ System.log("No VMs Found"); }
.