Edit

Share via


Update-AzRecoveryServicesAsrClusterProtectionDirection

Updates the replication direction for the specified replication protection cluster. Used to re-protect/reverse replicate a failed over replication protection cluster.

Syntax

AzureToAzureWithoutProtectedItemDetails (Default)

Update-AzRecoveryServicesAsrClusterProtectionDirection
    -ProtectionContainerMapping <ASRProtectionContainerMapping>
    -ReplicationProtectionCluster <ASRReplicationProtectionCluster>
    -RecoveryResourceGroupId <String>
    -LogStorageAccountId <String>
    [-AzureToAzure]
    [-RecoveryAvailabilitySetId <String>]
    [-RecoveryProximityPlacementGroupId <String>]
    [-RecoveryVirtualMachineScaleSetId <String>]
    [-RecoveryCapacityReservationGroupId <String>]
    [-RecoveryBootDiagStorageAccountId <String>]
    [-RecoveryAvailabilityZone <String>]
    [-DiskEncryptionVaultId <String>]
    [-DiskEncryptionSecretUrl <String>]
    [-KeyEncryptionKeyUrl <String>]
    [-KeyEncryptionVaultId <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

AzureToAzure

Update-AzRecoveryServicesAsrClusterProtectionDirection
    -ProtectionContainerMapping <ASRProtectionContainerMapping>
    -AzureToAzureReplicationProtectedItemConfig <ASRAzureToAzureReplicationProtectedItemConfig[]>
    -ReplicationProtectionCluster <ASRReplicationProtectionCluster>
    -RecoveryResourceGroupId <String>
    -LogStorageAccountId <String>
    [-AzureToAzure]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

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

Examples

Example 1

Update-AzRecoveryServicesAsrClusterProtectionDirection -AzureToAzure -ReplicationProtectionCluster $cluster -RecoveryProximityPlacementGroupId $ppg -RecoveryAvailabilitySetId $avset -RecoveryResourceGroupId $rgId -LogStorageAccountId $storage -ProtectionContainerMapping $recoverypcm

Start the update direction operation for the specified replication protection cluster in target azure region defined by protection container mapping without protected item replication configuration.

Example 2

Update-AzRecoveryServicesAsrClusterProtectionDirection -AzureToAzure -ReplicationProtectionCluster $cluster -AzureToAzureReplicationProtectedItemConfig $rpis -LogStorageAccountId $storage -ProtectionContainerMapping $recoverypcm -RecoveryResourceGroupId $rgId

Start the update direction operation for the specified replication protection cluster in target azure region defined by protection container mapping with protected item replication configuration.

Parameters

-AzureToAzure

Specifies the Azure to Azure disaster recovery.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-AzureToAzureReplicationProtectedItemConfig

Specifies the list of all replication protected items available in protection cluster.

Parameter properties

Type:

ASRAzureToAzureReplicationProtectedItemConfig[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AzureToAzure
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DiskEncryptionSecretUrl

Specifies the disk encryption secret URL(Azure disk encryption) to be used be recovery VM after failover.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AzureToAzureWithoutProtectedItemDetails
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DiskEncryptionVaultId

Specifies the disk encryption secret key vault ID(Azure disk encryption) to be used be recovery VM after failover.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AzureToAzureWithoutProtectedItemDetails
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-KeyEncryptionKeyUrl

Specifies the disk encryption secret key URL(Azure disk encryption) to be used be recovery VM after failover.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AzureToAzureWithoutProtectedItemDetails
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-KeyEncryptionVaultId

Specifies the disk encryption secret key vault ID(Azure disk encryption) to be used be recovery VM after failover.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AzureToAzureWithoutProtectedItemDetails
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LogStorageAccountId

Specifies the storage account ID to store the replication log of VMs.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ProtectionContainerMapping

Protection container Mapping to be used for replication.

Parameter properties

Type:ASRProtectionContainerMapping
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RecoveryAvailabilitySetId

The availability set that the virtual machine should be created in upon failover

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AzureToAzureWithoutProtectedItemDetails
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RecoveryAvailabilityZone

The availability zone that the virtual machine should be created in upon failover

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AzureToAzureWithoutProtectedItemDetails
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RecoveryBootDiagStorageAccountId

Specifies the storage account for boot diagnostics for recovery azure VM.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AzureToAzureWithoutProtectedItemDetails
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RecoveryCapacityReservationGroupId

Specify the capacity reservation group Id to be used by the failover VM in target recovery region.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AzureToAzureWithoutProtectedItemDetails
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RecoveryProximityPlacementGroupId

The resource ID of the recovery proximity placement group to failover this virtual machine to.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AzureToAzureWithoutProtectedItemDetails
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RecoveryResourceGroupId

Recovery resourceGroup id for protected Vm.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RecoveryVirtualMachineScaleSetId

Specifies the recovery virtual machine scale set id.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AzureToAzureWithoutProtectedItemDetails
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ReplicationProtectionCluster

Specifies the replication protection cluster object.

Parameter properties

Type:ASRReplicationProtectionCluster
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

ASRReplicationProtectionCluster

Outputs

ASRJob