Created
March 16, 2018 13:33
-
-
Save joe-speedboat/e3335cf20fcab49887928dcb51fda841 to your computer and use it in GitHub Desktop.
vRO - SDK > vCenters > vCenter > Cluster > VM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var vCenters=VcPlugin.allSdkConnections; | |
for each (vCenter in vCenters){ | |
System.log(vCenter.name); | |
var clusters = vCenter.getAllClusterComputeResources(); | |
for each (cluster in clusters) { | |
System.log(cluster.name); | |
var vms = vCenter.allVirtualMachines | |
for each (vm in vms) | |
System.log(vm.name); | |
//do your per vm action here | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment