How to get vcVm by vcacVm using vro

get vcVm by vcacVm

var sdkConnections = VcPlugin.allSdkConnections;
System.log(sdkConnections.length + " sdk Connections found...");
for each (var sdkConnection in sdkConnections) {
  try {
  vCenterVm = sdkConnection.searchIndex.findByUuid(null, vCACVm.vmUniqueID, true, false);
  } catch(e) {System.log("Error for SDK connection " + sdkConnection.name + " : " + e);}
  if (vCenterVm != null) {
  System.log("Resolved vCenter VM " + vCenterVm.name);
  return vCenterVm;
  break;
  }

}

Comments

Popular posts from this blog

CSP-102547 Patch Upgrade Experience VMware Identity Manager 3.3.7 & Aria Suite Lifecycle 8.18.0 (Patch 5 → 7)

Bulk Import DFW Rules to NSX-T using Aria Automation

VCF 9 Automation vs Aria Automation 8.x (Part 1)