Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 175326

List of PowerOff VMs

$
0
0

Hi,

 

I have a workflow to find out how many VM's are in poweredOff state. VC has more than 7000 VM's and the workflow takes lot of time to produce the result as it has to loop through each of these 7000 VM's to find those VM's which are in powered off state.

 

So just wondering if there is any other way to achieve the result much quicker.

 

 

var vms = VcPlugin.getAllVirtualMachines()
var poffvms = 0
for each (vm in vms){
if (vm.runtime.powerState.value == "poweredOff"){
poffvms = poffvms + 1
}
}
System.log(poffvms);

Viewing all articles
Browse latest Browse all 175326

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>