Function: SRM Protection Group Remove vCenter Virtual Machine

by Simon Sparks · 4 February 2026

To use this function add it to the class library file named OrchestratorPluginSRMService.ts

GitHub Repository: https://github.com/SimonSparksUK/Orchestrator

Filename: OrchestratorPluginSRMService.ts

Function: SRMProtectionGroupRemoveVcVirtualMachine

public SRMProtectionGroupRemoveVcVirtualMachine(objSRMRecoveryPlan: SRMRecoveryPlan, objVcVirtualMachine: VcVirtualMachine): boolean {

  let objSRMProtectedVm: SRMProtectedVm;
  objSRMProtectedVm.name = objVcVirtualMachine.name;
  objSRMProtectedVm.deploymentId = objVcVirtualMachine.id;

  let arrSRMProtectedVm: SRMProtectedVm[];
  arrSRMProtectedVm.push(objSRMProtectedVm);

  try {
    objSRMRecoveryPlan.unprotectVm(arrSRMProtectedVm)

    return true;
  }
  catch (objError) {
    return false;
  }
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like