Exemplo n.º 1
0
        /// <summary>
        /// Restart by Name.
        /// </summary>
        private void StopByName()
        {
            LongRunningOperationResponse response = RecoveryServicesClient.CancelAzureSiteRecoveryJob(this.Name);

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

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