Microsoft.Azure.Commands.SiteRecovery.RemoveAzureRmSiteRecoveryRecoveryPlan.ExecuteSiteRecoveryCmdlet C# (CSharp) Method

ExecuteSiteRecoveryCmdlet() public method

ProcessRecord of the command.
public ExecuteSiteRecoveryCmdlet ( ) : void
return void
        public override void ExecuteSiteRecoveryCmdlet()
        {
            base.ExecuteSiteRecoveryCmdlet();

            if (string.Compare(this.ParameterSetName, ASRParameterSets.ByObject, StringComparison.OrdinalIgnoreCase) == 0)
            {
                this.Name = this.RecoveryPlan.Name;
            }

            LongRunningOperationResponse response = RecoveryServicesClient.RemoveAzureSiteRecoveryRecoveryPlan(this.Name);

            JobResponse jobResponse =
                RecoveryServicesClient
                .GetAzureSiteRecoveryJobDetails(PSRecoveryServicesClient.GetJobIdFromReponseLocation(response.Location));

            WriteObject(new ASRJob(jobResponse.Job));
        }
    }
RemoveAzureRmSiteRecoveryRecoveryPlan