Skip to content

Commit 7ef3d99

Browse files
author
Ankita Dutta
committed
Pwshell edits
1 parent 664c198 commit 7ef3d99

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

articles/site-recovery/azure-to-azure-tutorial-enable-replication-shared-disk.md

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ SubscriptionId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
7171
Properties : Microsoft.Azure.Commands.RecoveryServices.ARSVaultProperties
7272
```
7373

74-
## Prepare the vault to start replicating Azure virtual
74+
## Prepare the vault to start replicating Azure virtual machines
75+
7576

7677
To prepare the vault for replication, you need to do the following:
7778

@@ -293,13 +294,9 @@ Fail over the cluster to a specific recovery point.
293294
```powershell
294295
$rpi1 = Get-ASRReplicationProtectedItem -ProtectionContainer $protectionContainer -FriendlyName "sdgql1"
295296
$rpi2 = Get-ASRReplicationProtectedItem -ProtectionContainer $protectionContainer -FriendlyName "sdgql2"
296-
297297
$nodeRecoveryPoint1 = Get-ASRRecoveryPoint -ReplicationProtectedItem $rpi1
298-
299298
$nodeRecoveryPoint2 = Get-ASRRecoveryPoint -ReplicationProtectedItem $rpi2
300-
301299
$nodeRecoveryPoints = @($nodeRecoveryPoint1[-1].ID, $nodeRecoveryPoint2[-1].ID)
302-
303300
$clusterRecoveryPoints = Get-AzRecoveryServicesAsrClusterRecoveryPoint -ReplicationProtectionCluster $protectionCluster
304301
$ufoJob = Start-AzRecoveryServicesAsrClusterUnplannedFailoverJob -ReplicationProtectionCluster $protectionCluster -Direction PrimaryToRecovery -ClusterRecoveryPoint $clusterRecoveryPoints[-1] -ListNodeRecoveryPoint $nodeRecoveryPoints
305302
```
@@ -311,15 +308,10 @@ You can change the point in time to which you want to fail over. This is useful
311308
```powershell
312309
$rpi1 = Get-ASRReplicationProtectedItem -ProtectionContainer $protectionContainer -FriendlyName "sdgql1"
313310
$rpi2 = Get-ASRReplicationProtectedItem -ProtectionContainer $protectionContainer -FriendlyName "sdgql2"
314-
315311
$nodeRecoveryPoint1 = Get-ASRRecoveryPoint -ReplicationProtectedItem $rpi1
316-
317312
$nodeRecoveryPoint2 = Get-ASRRecoveryPoint -ReplicationProtectedItem $rpi2
318-
319313
$nodeRecoveryPoints = @($nodeRecoveryPoint1[-1].ID, $nodeRecoveryPoint2[-1].ID)
320-
321314
$clusterRecoveryPoints = Get-AzRecoveryServicesAsrClusterRecoveryPoint -ReplicationProtectionCluster $protectionCluster
322-
323315
$changePitJob = Start-AzRecoveryServicesAsrApplyClusterRecoveryPoint -ReplicationProtectionCluster $protectionCluster -ClusterRecoveryPoint $clusterRecoveryPoints[-1] -ListNodeRecoveryPoint $nodeRecoveryPoints
324316
```
325317

@@ -336,27 +328,18 @@ After failover, protect the Cluster in the new source region back and failover t
336328

337329
```powershell
338330
$storage = "/subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/vijami-alertrg/providers/Microsoft.Storage/storageAccounts/yerp1nvijamitestasrcache"
339-
340331
$ppg = "/subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/ClusterRG-Vijami-1003165924/providers/Microsoft.Compute/proximityPlacementGroups/sdgql-ppg"
341-
342332
$avset = "/subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/ClusterRG-Vijami-1003165924/providers/Microsoft.Compute/availabilitySets/SDGQL-AS"
343-
344333
$rgId = "/subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/ClusterRG-Vijami-1003165924"
345334
346335
# Without protected item details
347336
348337
$recoveryFabricName = "asr-a2a-default-westus"
349-
350338
$recoveryFabric = Get-AzRecoveryServicesAsrFabric -Name $recoveryFabricName
351-
352339
$recoverypc = Get-AzRecoveryServicesAsrProtectionContainer -Fabric $recoveryFabric
353-
354340
$recoverypcm = Get-AzRecoveryServicesAsrProtectionContainerMapping -ProtectionContainer $recoverypc -Name "westus-eastus2-24-hour-retention-policy"
355-
356341
$ReprotectJob = Update-AzRecoveryServicesAsrClusterProtectionDirection -AzureToAzure -ReplicationProtectionCluster $cluster `
357-
358342
-RecoveryProximityPlacementGroupId $ppg -RecoveryAvailabilitySetId $avset `
359-
360343
-RecoveryResourceGroupId $rgId -LogStorageAccountId $storage -ProtectionContainerMapping $recoverypcm
361344
```
362345

0 commit comments

Comments
 (0)