Last active
May 16, 2020 18:49
-
-
Save mccbryan3/53c863acfc33f960296e722531e9d810 to your computer and use it in GitHub Desktop.
This will take a VM input and search all vcenters added to vro and load the VC:Vm and VC:SdkConnection into output variables
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 reg = new RegExp("^"+ strVmName + "$", 'ig'); | |
for each(vm in VcPlugin.getAllVirtualMachines(null,"xpath:name='" + strVmName + "'")) { | |
if(vm.name.match(reg)) { | |
vcenterSdk = vm.sdkConnection | |
vmOut = vm | |
System.log(vmOut.summary) | |
System.log(vcenterSdk) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment