Update-AzRecoveryServicesAsrProtectionDirection
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.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
Update-AzRecoveryServicesAsrProtectionDirection
-ReplicationProtectedItem <ASRReplicationProtectedItem>
-Direction <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzRecoveryServicesAsrProtectionDirection
[-AzureToVMware]
[-Account <ASRRunAsAccount>]
-DataStore <ASRDataStore>
[-MasterTarget <ASRMasterTargetServer>]
-ProcessServer <ASRProcessServer>
-ProtectionContainerMapping <ASRProtectionContainerMapping>
-ReplicationProtectedItem <ASRReplicationProtectedItem>
-Direction <String>
-RetentionVolume <ASRRetentionVolume>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzRecoveryServicesAsrProtectionDirection
[-VMwareToAzure]
-Account <ASRRunAsAccount>
[-MasterTarget <ASRMasterTargetServer>]
-ProcessServer <ASRProcessServer>
-ProtectionContainerMapping <ASRProtectionContainerMapping>
[-LogStorageAccountId <String>]
[-RecoveryAzureStorageAccountId <String>]
-ReplicationProtectedItem <ASRReplicationProtectedItem>
-Direction <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzRecoveryServicesAsrProtectionDirection
[-ReplicateAzureToVMware]
-ProtectionContainerMapping <ASRProtectionContainerMapping>
-DataStoreName <String>
-ApplianceName <String>
-Fabric <ASRFabric>
-LogStorageAccountId <String>
-ReplicationProtectedItem <ASRReplicationProtectedItem>
-Direction <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzRecoveryServicesAsrProtectionDirection
[-ReplicateVMwareToAzure]
-SiteId <String>
-CredentialsToAccessVm <String>
-ProtectionContainerMapping <ASRProtectionContainerMapping>
-ApplianceName <String>
-Fabric <ASRFabric>
-ReplicationProtectedItem <ASRReplicationProtectedItem>
-Direction <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzRecoveryServicesAsrProtectionDirection
[-HyperVToAzure]
[-LogStorageAccountId <String>]
[-RecoveryAzureStorageAccountId <String>]
-ReplicationProtectedItem <ASRReplicationProtectedItem>
-Direction <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzRecoveryServicesAsrProtectionDirection
[-VmmToVmm]
-ReplicationProtectedItem <ASRReplicationProtectedItem>
-Direction <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzRecoveryServicesAsrProtectionDirection
[-AzureToAzure]
-ProtectionContainerMapping <ASRProtectionContainerMapping>
-LogStorageAccountId <String>
[-RecoveryAzureStorageAccountId <String>]
-ReplicationProtectedItem <ASRReplicationProtectedItem>
[-RecoveryResourceGroupId <String>]
[-RecoveryCloudServiceId <String>]
[-RecoveryAvailabilitySetId <String>]
[-RecoveryProximityPlacementGroupId <String>]
[-RecoveryVirtualMachineScaleSetId <String>]
[-RecoveryCapacityReservationGroupId <String>]
[-RecoveryBootDiagStorageAccountId <String>]
[-DiskEncryptionVaultId <String>]
[-DiskEncryptionSecretUrl <String>]
[-KeyEncryptionKeyUrl <String>]
[-KeyEncryptionVaultId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzRecoveryServicesAsrProtectionDirection
[-AzureToAzure]
-ProtectionContainerMapping <ASRProtectionContainerMapping>
-AzureToAzureDiskReplicationConfiguration <ASRAzuretoAzureDiskReplicationConfig[]>
-ReplicationProtectedItem <ASRReplicationProtectedItem>
[-RecoveryResourceGroupId <String>]
[-RecoveryCloudServiceId <String>]
[-RecoveryAvailabilitySetId <String>]
[-RecoveryProximityPlacementGroupId <String>]
[-RecoveryVirtualMachineScaleSetId <String>]
[-RecoveryCapacityReservationGroupId <String>]
[-RecoveryBootDiagStorageAccountId <String>]
[-DiskEncryptionVaultId <String>]
[-DiskEncryptionSecretUrl <String>]
[-KeyEncryptionKeyUrl <String>]
[-KeyEncryptionVaultId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzRecoveryServicesAsrProtectionDirection
-RecoveryPlan <ASRRecoveryPlan>
-Direction <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzRecoveryServicesAsrProtectionDirection
-Direction <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Update-AzRecoveryServicesAsrProtectionDirection cmdlet updates the replication direction for the specified Azure Site Recovery object after the completion of a commit failover operation.
Examples
Example 1
$currentJob = Update-AzRecoveryServicesAsrProtectionDirection -RecoveryPlan $RP -Direction PrimaryToRecovery
Start the update direction operation for the specified recovery plan and returns the ASR job object used to track the operation.
Example 2
$currentJob = Update-AzRecoveryServicesAsrProtectionDirection -AzureToAzure -ProtectionContainerMapping $B2ApcmMapping -LogStorageAccountId $cacheStorageId `
-ReplicationProtectedItem $rpi
Start the update direction operation for the specified replication protected item in target azure region defined by protection container mapping and using cache storage (in same region as VM).
Example 3
$currentJob = Update-AzRecoveryServicesAsrProtectionDirection -AzureToAzure -ProtectionContainerMapping $B2ApcmMapping `
-AzureToAzureDiskReplicationConfiguration $disk1,$disk2 -ReplicationProtectedItem $rpi
Start the update direction operation for the specified replication protected item in target azure region defined by protection container mapping and provided disk replication configuration.
Example 4
$currentJob = Update-AzRecoveryServicesAsrProtectionDirection -AzureToAzure -ProtectionContainerMapping $B2ApcmMapping `
-AzureToAzureDiskReplicationConfiguration $disk1,$disk2 -ReplicationProtectedItem $rpi `
-DiskEncryptionVaultId $DiskEncryptionVaultId -DiskEncryptionSecertUrl $DiskEncryptionSecertUrl `
-KeyEncryptionVaultId $KeyEncryptionVaultId -KeyEncryptionKeyUrl $KeyEncryptionKeyUrl
Start the update direction operation for the specified encrypted replication protected item in target azure region defined by protection container mapping and provided disk replication configuration.
Example 5
$currentJob = Update-AzRecoveryServicesAsrProtectionDirection -AzureToAzure -ProtectionContainerMapping $B2ApcmMapping -LogStorageAccountId $cacheStorageId `
-ReplicationProtectedItem $rpi -RecoveryProximityPlacementGroupId $ppg
Start the update direction operation for the specified replication protected item in target azure region defined by protection container mapping and using cache storage (in same region as VM) and proximity placement group.
Example 6
$currentJob = Update-AzRecoveryServicesAsrProtectionDirection -AzureToAzure -ProtectionContainerMapping $B2ApcmMapping -LogStorageAccountId $cacheStorageId `
-ReplicationProtectedItem $rpi -RecoveryVirtualMachineScaleSetId $vmss
Start the update direction operation for the specified replication protected item in target azure region defined by protection container mapping and using cache storage (in same region as VM) and virtual machine scale set.
Parameters
The run as account to be used to push install the Mobility service if needed. Must be one from the list of run as accounts in the ASR fabric.
| Type: | ASRRunAsAccount |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the name of appliance to be used to replicate this machine.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the Azure to Azure disaster recovery.
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the disk configuration for disaster recovery.
| Type: | ASRAzuretoAzureDiskReplicationConfig[] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the switch azure to vMWare scenario.
| Type: | SwitchParameter |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
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 |
Specifies the name of credentials to be used to push install the Mobility service on source machine if needed.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The VMware data-store to be used for the vmdisk's.
| Type: | ASRDataStore |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Name of the VMware data store to be used for the VM disk's.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with Azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the direction to be used for the update operation post a failover. The acceptable values for this parameter are:
- PrimaryToRecovery
- RecoveryToPrimary
| Type: | String |
| Accepted values: | PrimaryToRecovery, RecoveryToPrimary |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the disk encryption secret URL with version(Azure disk encryption) to be used be recovery VM after failover.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the disk encryption secret vault ID(Azure disk encryption) to be used be recovery VM after failover.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the ASR Fabric object.
| Type: | ASRFabric |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Reprotect a Hyper-V virtual machine after failback.
| Type: | SwitchParameter |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the disk encryption key URL(Azure disk encryption) to be used be recovery VM after failover.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the disk encryption key keyVault ID(Azure disk encryption) to be used be recovery VM after failover.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the storage account ID to store the replication log of VMs.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Master Target Server Details.
| Type: | ASRMasterTargetServer |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Process Server to be used for replication.
| Type: | ASRProcessServer |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Protection containerMapping to be used for replication.
| Type: | ASRProtectionContainerMapping |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The availability set that the virtual machine should be created in upon failover
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the ID of the Azure storage account to replicate to.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the storage account for boot diagnostics for recovery azure VM.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specify the capacity reservation group Id to be used by the failover VM in target recovery region.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The resource ID of the recovery cloud service to failover this virtual machine to.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies an ASR recovery plan object.
| Type: | ASRRecoveryPlan |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
The resource ID of the recovery proximity placement group to failover this virtual machine to.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Recovery resourceGroup id for protected Vm.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the reccovery virtual machine scale set id.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Switch parameter specifying Azure to VMware replication scenario..
| Type: | SwitchParameter |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Switch parameter specifying VMware to Azure replication scenario..
| Type: | SwitchParameter |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies an ASR replication protected item.
| Type: | ASRReplicationProtectedItem |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Retention Volume on the master target server to be used.
| Type: | ASRRetentionVolume |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the VMware site Id where the protectable item was discovered. Use site Id from fabric specific details in the ASR fabric to specify one.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Update replication direction for a failed over Hyper-V virtual machine that is protected between two VMM managed Hyper-V sites.
| Type: | SwitchParameter |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Update replication direction from VMware to Azure.
| Type: | SwitchParameter |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
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 |