public void TriggerRestoreTest()
        {
            using (UndoContext context = UndoContext.Current)
            {
                context.Start();
                var client = GetServiceClient<BackupServicesManagementClient>();

                string containerName = ConfigurationManager.AppSettings["ContainerName"];
                string itemName = ConfigurationManager.AppSettings["ItemName"];
                string recoveryPointName = ConfigurationManager.AppSettings["RecoveryPointName"];
                string region = ConfigurationManager.AppSettings["Region"];
                string storageAccountName = ConfigurationManager.AppSettings["StorageAccountName"];

                AzureIaaSVMRecoveryInputsCSMObject azureIaaSVMRecoveryInputsCSMObject = new AzureIaaSVMRecoveryInputsCSMObject()
                {
                    AffinityGroup = string.Empty,
                    CloudServiceName = string.Empty,
                    VmName = string.Empty,
                    CreateNewCloudService = false,
                    Region = region,
                    InputStorageAccountName = storageAccountName,
                    ContinueProtection = false,
                    SubNetName = string.Empty,
                    TargetVNet = string.Empty,
                };

                var serializer = new JavaScriptSerializer();
                string azureIaaSVMRecoveryInputsCSMObjectString = serializer.Serialize(azureIaaSVMRecoveryInputsCSMObject);

                CSMRestoreRequest restoreRequest = new CSMRestoreRequest()
                {
                    Properties = new CSMRestoreRequestProperties()
                    {
                        TypeOfRecovery = RecoveryType.RestoreDisks.ToString(),
                        RecoveryDSTypeSpecificInputs = azureIaaSVMRecoveryInputsCSMObjectString,
                    },
                };

                var response = client.Restore.TriggerResotre(BackupServicesTestsBase.ResourceGroupName, BackupServicesTestsBase.ResourceName, GetCustomRequestHeaders(), containerName, itemName, recoveryPointName, restoreRequest);
                Assert.Equal(HttpStatusCode.Accepted, response.StatusCode);
            }
        }
        public override void ExecuteCmdlet()
        {
            base.ExecuteCmdlet();

            ExecutionBlock(() =>
            {
                WriteDebug(Resources.MakingClientCall);
                AzureIaaSVMRecoveryInputsCSMObject azureIaaSVMRecoveryInputsCSMObject = new AzureIaaSVMRecoveryInputsCSMObject()
                {
                    CloudServiceName = string.Empty,
                    VmName = string.Empty,
                    CreateNewCloudService = false,
                    ContinueProtection = false,
                    InputStorageAccountName = StorageAccountName,
                    AffinityGroup = "",
                    Region = RecoveryPoint.Location,
                };

                JavaScriptSerializer serializer = new JavaScriptSerializer();
                string azureIaaSVMRecoveryInputsCSMObjectString = serializer.Serialize(azureIaaSVMRecoveryInputsCSMObject);

                CSMRestoreRequest csmRestoreRequest = new CSMRestoreRequest()
                {
                    Properties = new CSMRestoreRequestProperties()
                    {
                        TypeOfRecovery = RecoveryType.RestoreDisks.ToString(),
                        RecoveryDSTypeSpecificInputs = azureIaaSVMRecoveryInputsCSMObjectString,
                    },
                };

                Guid operationId = AzureBackupClient.TriggerRestore(RecoveryPoint.ResourceGroupName, RecoveryPoint.ResourceName, RecoveryPoint.ContainerUniqueName, RecoveryPoint.ItemName, RecoveryPoint.RecoveryPointName, csmRestoreRequest);
                WriteDebug(string.Format(Resources.TriggeringRestore, operationId));

                var operationStatus = TrackOperation(RecoveryPoint.ResourceGroupName, RecoveryPoint.ResourceName, operationId);
                WriteObject(GetCreatedJobs(RecoveryPoint.ResourceGroupName,
                    RecoveryPoint.ResourceName,
                    new Models.AzureRMBackupVault(RecoveryPoint.ResourceGroupName, RecoveryPoint.ResourceName, RecoveryPoint.Location),
                    operationStatus.JobList).FirstOrDefault());

            });
        }