none
ASR Recovery Plan Groups RRS feed

  • Question

  • Hi,

    I'm trying to create a second/third ASR groups and adding protected items to specific groups.  I'm using the following syntax -

    #this commands creates Group 1 and adds the protected items in $RPI

    $currentJob = New-AzRecoveryServicesAsrRecoveryPlan -Name $RecoveryPlanName -PrimaryFabric $PrimaryFabric -RecoveryFabric $RecoveryFabric -ReplicationProtectedItem $RPI

    This command does not work.  It does not create Group 2.

    $RP = Edit-AzRecoveryServicesAsrRecoveryPlan  -InputObject $RP  -Group $Group[2] -AddProtectedItem $newvm

    # This command does a create a group, but I need another command to add protected items.

    $RP = Edit-AzRecoveryServicesAsrRecoveryPlan -InputObject $RP -AppendGroup

    Thanks for your help.

    Monday, October 7, 2019 7:33 PM

All replies

  • To add new group

    Cmdlet $RP = Edit-AzRecoveryServicesAsrRecoveryPlan -InputObject $RP -AppendGroup

     

      Suppose 3 is index of newly added group or the group where RPI item should be added

    To add item in group Cmdlet  

    $RP = Edit-AzRecoveryServicesAsrRecoveryPlan -InputObject $RP -Group $rp.Groups[4] -AddProtectedItem $rplist[2]

    Wednesday, October 16, 2019 10:07 AM
    Moderator