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
publicSRMProtectionGroupRemoveVcVirtualMachine(objSRMRecoveryPlan:SRMRecoveryPlan,objVcVirtualMachine:VcVirtualMachine):boolean{
letobjSRMProtectedVm:SRMProtectedVm;
objSRMProtectedVm.name=objVcVirtualMachine.name;
objSRMProtectedVm.deploymentId=objVcVirtualMachine.id;
letarrSRMProtectedVm:SRMProtectedVm[];
arrSRMProtectedVm.push(objSRMProtectedVm);
try{
objSRMRecoveryPlan.unprotectVm(arrSRMProtectedVm)
returntrue;
}
catch (objError){
returnfalse;
}
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
