Skip to content

Commit 2b2a44c

Browse files
author
Sambit Rath
committed
updated markdown help files with examples
1 parent 113e54b commit 2b2a44c

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/RecoveryServices/RecoveryServices/help/Enable-AzRecoveryServicesBackupProtection.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,16 @@ Set the vault context by using the Set-AzRecoveryServicesVaultContext cmdlet bef
5858
### Example 1: Enable Backup protection for an item
5959
```
6060
PS C:\> $Pol = Get-AzRecoveryServicesBackupProtectionPolicy -Name "DefaultPolicy"
61-
PS C:\> Enable-AzRecoveryServicesBackupProtection -Policy $Pol -Name "V2VM" -ResourceGroupName "RGName1"
61+
PS C:\> $inclusionDiskLUNS = ("1", "2")
62+
PS C:\> Enable-AzRecoveryServicesBackupProtection -Policy $Pol -Name "V2VM" -ResourceGroupName "RGName1" -InclusionDisksList $inclusionDiskLUNS
6263
WorkloadName Operation Status StartTime EndTime
6364
------------ --------- ------ --------- -------
6465
co03-vm ConfigureBackup Completed 11-Apr-16 12:19:49 PM 11-Apr-16 12:19:54 PM
6566
```
6667

6768
The first cmdlet gets a default policy object, and then stores it in the $Pol variable.
68-
The second cmdlet sets the Backup protection policy for the ARM virtual machine named V2VM using the policy in $Pol.
69+
The second cmdlet specifies the disk LUNs which are to be backed up and stores it in $inclusionDiskLUNS variable.
70+
The third cmdlet sets the Backup protection policy for the ARM virtual machine named V2VM using the policy in $Pol.
6971

7072
## PARAMETERS
7173

src/RecoveryServices/RecoveryServices/help/Restore-AzRecoveryServicesBackupItem.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ PS C:\> $BackupItem = Get-AzRecoveryServicesBackupItem -ContainerType AzureVM -W
6060
PS C:\> $StartDate = (Get-Date).AddDays(-7)
6161
PS C:\> $EndDate = Get-Date
6262
PS C:\> $RP = Get-AzRecoveryServicesBackupRecoveryPoint -Item $BackupItem -StartDate $StartDate.ToUniversalTime() -EndDate $EndDate.ToUniversalTime() -VaultId $vault.ID
63-
PS C:\> $RestoreJob = Restore-AzRecoveryServicesBackupItem -RecoveryPoint $RP[0] -TargetRG $ManagedDiskRG -StorageAccountName "DestAccount" -StorageAccountResourceGroupName "DestRG" -VaultId $vault.ID -VaultLocation $vault.Location
63+
PS C:\> $restoreDiskLUNs = ("0", "1")
64+
PS C:\> $RestoreJob = Restore-AzRecoveryServicesBackupItem -RecoveryPoint $RP[0] -TargetRG $ManagedDiskRG -StorageAccountName "DestAccount" -StorageAccountResourceGroupName "DestRG" -RestoreDiskList $restoreDiskLUNs -VaultId $vault.ID -VaultLocation $vault.Location
6465
WorkloadName Operation Status StartTime EndTime
6566
------------ --------- ------ --------- -------
6667
V2VM Restore InProgress 26-Apr-16 1:14:01 PM 01-Jan-01 12:00:00 AM
@@ -72,6 +73,7 @@ The third command gets the date from seven days earlier, and then stores it in t
7273
The fourth command gets the current date, and then stores it in the $EndDate variable.
7374
The fifth command gets a list of recovery points for the specific backup item filtered by $StartDate and $EndDate.
7475
The date range specified is the last 7 days.
76+
The seventh command specifies which disks to restore from the recovery point and stores it in $restoreDiskLUNs variable.
7577
The last command restores the disks to the target storage account DestAccount in the DestRG resource group.
7678

7779
## PARAMETERS

0 commit comments

Comments
 (0)