Skip to content

Commit 6f01f0a

Browse files
authored
Merge pull request #27035 from EricBergDE/patch-7
fixes and clarification to Step 6 and 7
2 parents 76226fe + f30704c commit 6f01f0a

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

articles/site-recovery/hyper-v-azure-powershell-resource-manager.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,14 @@ Before you start, note that the storage account specified should be in the same
140140
$protectionContainer = Get-AsrProtectionContainer
141141
3. Associate the protection container with the replication policy, as follows:
142142
143-
$Policy = Get-AsrPolicy -FriendlyName $PolicyName
144-
$associationJob = New-AsrProtectionContainerMapping -Name $mappingName -Policy $Policy -PrimaryProtectionContainer $protectionContainer[0]
145-
143+
$Policy = Get-AsrPolicy -FriendlyName $PolicyName
144+
$associationJob = New-AsrProtectionContainerMapping -Name $mappingName -Policy $Policy -PrimaryProtectionContainer $protectionContainer[0]
146145
4. Wait for the association job to complete successfully.
147146
147+
5. Retrieve the protection container mapping.
148+
149+
$ProtectionContainerMapping = Get-ASRProtectionContainerMapping -ProtectionContainer $protectionContainer
150+
148151
## Step 7: Enable VM protection
149152
150153
1. Retrieve the protectable item that corresponds to the VM you want to protect, as follows:
@@ -153,8 +156,8 @@ Before you start, note that the storage account specified should be in the same
153156
$ProtectableItem = Get-AsrProtectableItem -ProtectionContainer $protectionContainer -FriendlyName $VMFriendlyName
154157
2. Protect the VM. If the VM you are protecting has more than one disk attached to it, specify the operating system disk by using the *OSDiskName* parameter.
155158
156-
$Ostype = "Windows" # "Windows" or "Linux"
157-
$DRjob = New-AsrReplicationProtectedItem -ProtectableItem $VM -Name $VM.Name -ProtectionContainerMapping $ProtectionContainerMapping -RecoveryAzureStorageAccountId $StorageAccountID -OSDiskName $OSDiskNameList[$i] -OS Windows -RecoveryResourceGroupId
159+
$OSType = "Windows" # "Windows" or "Linux"
160+
$DRjob = New-AsrReplicationProtectedItem -ProtectableItem $VM -Name $VM.Name -ProtectionContainerMapping $ProtectionContainerMapping -RecoveryAzureStorageAccountId $StorageAccountID -OSDiskName $OSDiskNameList[$i] -OS $OSType -RecoveryResourceGroupId $ResourceGroupID
158161
159162
3. Wait for the VMs to reach a protected state after the initial replication. This can take a while, depending on factors such as the amount of data to be replicated, and the available upstream bandwidth to Azure. When a protected state is in place, the job State and StateDescription are updated as follows:
160163

0 commit comments

Comments
 (0)