Update-​Azure​Rm​Recovery​Services​Asr​Protection​Direction

Updates the replication direction for the specified replication protected item or recovery plan. Used to re-protect/reverse replicate a failed over replicated item or recovery plan.

Syntax

Update-AzureRmRecoveryServicesAsrProtectionDirection
      -Direction <String>
      -RecoveryPlan <ASRRecoveryPlan>
      [-Confirm]
      [-WhatIf]
      [<CommonParameters>]
Update-AzureRmRecoveryServicesAsrProtectionDirection
      -Direction <String>
      -ReplicationProtectedItem <ASRReplicationProtectedItem>
      [-Confirm]
      [-WhatIf]
      [<CommonParameters>]

Description

The Update-AzureRmRecoveryServicesAsrProtectionDirection cmdlet updates the replication direction for the specified Azure Site Recovery object after the completion of a commit failover operation.

Examples

Example 1

PS C:\> $currentJob = Update-AzureRmRecoveryServicesAsrProtectionDirection -RecoveryPlan $RP -Direction PrimaryToRecovery

Start the update direction operation for the specified recoveyr plan and returns the ASR job object used to track the operation.

Required Parameters

-Direction

Specifies the direction to be used for the update operation post a failover.
The acceptable values for this parameter are:

  • PrimaryToRecovery
  • RecoveryToPrimary
Type:String
Parameter Sets:PrimaryToRecovery, RecoveryToPrimary
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RecoveryPlan

Specifies an ASR recovery plan object.

Type:ASRRecoveryPlan
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-ReplicationProtectedItem

Specifies an ASR replication protected item

Type:ASRReplicationProtectedItem
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRRecoveryPlan

Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRReplicationProtectedItem

Outputs

Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRJob