PowerOff VM_Task Script for ESX

Posted on 2:50 PM by Bharathvn

ManagedObjectReference MgdObjRef_VM =
_service.findByInventoryPath(_sic.SearchIndex(), pathVM);
ManagedObjectReference MgdObjRef_Host =
_service.findByInventoryPath(_sic.SearchIndex(), pathHost);
ManagedObjectReference MgdObjRef_Task =
_service.PowerOffVM(MgdObjRef_VM, MgdObjRef_Host);