Skip to content

Instantly share code, notes, and snippets.

@johnddias
Last active March 23, 2016 19:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnddias/a0fb227ac8daef0493c5 to your computer and use it in GitHub Desktop.
Save johnddias/a0fb227ac8daef0493c5 to your computer and use it in GitHub Desktop.
var vCenterVms=System.getModule("com.vmware.library.vc.vm").getAllVMs();
for (vm in vCenterVms) {
if (vm.id==machineProp.get("externalReference") && machineProp.get("externalReference")) {
vCenterVm=vm;
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment