Skip to content

Instantly share code, notes, and snippets.

@YagmurOzden
Created December 24, 2021 06:25
Show Gist options
  • Save YagmurOzden/949e2333c0572010128a00baa4941ebe to your computer and use it in GitHub Desktop.
Save YagmurOzden/949e2333c0572010128a00baa4941ebe to your computer and use it in GitHub Desktop.
get random VM (VMware vRO action, vSphere, virtual machine)
var vms = VcPlugin.getAllVirtualMachines();
var output = [];
for (var i = 0 ; i < vms.length ; i++){
output.push(vms[i].name);
}
return output[0];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment