//get list of all VM's vms = System.getModule("com.vmware.library.vc.vm").getAllVMs(); // for individual vm's //guestToolsNotRunning for each (vm in vms){ if (vm.guest.toolsStatus == VcVirtualMachineToolsStatus.toolsNotRunning && vm.runtime.powerState.value === "poweredOn") { //initailize array if needed if (machines == null) { machines = new Array(); } //System.log("VM : " + vm.name + " is included"); machines.push(vm.name); } }