< Back

Update-AzureRmRecoveryServicesAsrProtectionDirection

Tue Jan 29, 2019 10:03 pm

NAME Update-AzureRmRecoveryServicesAsrProtectionDirection



SYNOPSIS

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 [-AzureToVMware] [-Account <ASRRunAsAccount>] [-Confirm] -DataStore <ASRDataStore>

[-DefaultProfile <IAzureContextContainer>] -Direction {PrimaryToRecovery | RecoveryToPrimary} [-MasterTarget <ASRMasterTargetServer>]

-ProcessServer <ASRProcessServer> -ProtectionContainerMapping <ASRProtectionContainerMapping> -ReplicationProtectedItem

<ASRReplicationProtectedItem> -RetentionVolume <ASRRetentionVolume> [-WhatIf] [<CommonParameters>]



Update-AzureRmRecoveryServicesAsrProtectionDirection [-VMwareToAzure] -Account <ASRRunAsAccount> [-Confirm] [-DefaultProfile

<IAzureContextContainer>] -Direction {PrimaryToRecovery | RecoveryToPrimary} [-LogStorageAccountId <String>] [-MasterTarget

<ASRMasterTargetServer>] -ProcessServer <ASRProcessServer> -ProtectionContainerMapping <ASRProtectionContainerMapping>

[-RecoveryAzureStorageAccountId <String>] -ReplicationProtectedItem <ASRReplicationProtectedItem> [-WhatIf] [<CommonParameters>]



Update-AzureRmRecoveryServicesAsrProtectionDirection -AzureToAzure [-Confirm] [-DefaultProfile <IAzureContextContainer>] -LogStorageAccountId

<String> -ProtectionContainerMapping <ASRProtectionContainerMapping> [-RecoveryAvailabilitySetId <String>] [-RecoveryAzureStorageAccountId

<String>] [-RecoveryCloudServiceId <String>] [-RecoveryResourceGroupId <String>] -ReplicationProtectedItem <ASRReplicationProtectedItem> [-WhatIf]

[<CommonParameters>]



Update-AzureRmRecoveryServicesAsrProtectionDirection -AzureToAzure -AzureToAzureDiskReplicationConfiguration

<ASRAzuretoAzureDiskReplicationConfig[]> [-Confirm] [-DefaultProfile <IAzureContextContainer>] -ProtectionContainerMapping

<ASRProtectionContainerMapping> [-RecoveryAvailabilitySetId <String>] [-RecoveryCloudServiceId <String>] [-RecoveryResourceGroupId <String>]

-ReplicationProtectedItem <ASRReplicationProtectedItem> [-WhatIf] [<CommonParameters>]



Update-AzureRmRecoveryServicesAsrProtectionDirection [-Confirm] [-DefaultProfile <IAzureContextContainer>] -Direction {PrimaryToRecovery |

RecoveryToPrimary} -ReplicationProtectedItem <ASRReplicationProtectedItem> [-WhatIf] [<CommonParameters>]



Update-AzureRmRecoveryServicesAsrProtectionDirection [-HyperVToAzure] [-Confirm] [-DefaultProfile <IAzureContextContainer>] -Direction

{PrimaryToRecovery | RecoveryToPrimary} [-LogStorageAccountId <String>] [-RecoveryAzureStorageAccountId <String>] -ReplicationProtectedItem

<ASRReplicationProtectedItem> [-WhatIf] [<CommonParameters>]



Update-AzureRmRecoveryServicesAsrProtectionDirection [-VmmToVmm] [-Confirm] [-DefaultProfile <IAzureContextContainer>] -Direction

{PrimaryToRecovery | RecoveryToPrimary} -ReplicationProtectedItem <ASRReplicationProtectedItem> [-WhatIf] [<CommonParameters>]



Update-AzureRmRecoveryServicesAsrProtectionDirection [-Confirm] [-DefaultProfile <IAzureContextContainer>] -Direction {PrimaryToRecovery |

RecoveryToPrimary} -RecoveryPlan <ASRRecoveryPlan> [-WhatIf] [<CommonParameters>]



Update-AzureRmRecoveryServicesAsrProtectionDirection [-Confirm] [-DefaultProfile <IAzureContextContainer>] -Direction {PrimaryToRecovery |

RecoveryToPrimary} [-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.





PARAMETERS

-Account <ASRRunAsAccount>

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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-AzureToAzure [<SwitchParameter>]

Switch parameter specifying that the replication direction being updated for replicated Azure virtual machines between two Azure regions.



Required? true

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-AzureToAzureDiskReplicationConfiguration <ASRAzuretoAzureDiskReplicationConfig[]>

Specifies the list of virtual machine disks to replicated and the cache storage account and recovery storage account to be used to replicate

the disk.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-AzureToVMware [<SwitchParameter>]

Update replication direction from Azure to Vmware.



Required? true

Position? 0

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-DataStore <ASRDataStore>

The VMware datastore to be used for the vmdisk's.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Direction <String>

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



- PrimaryToRecovery



- RecoveryToPrimary



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-HyperVToAzure [<SwitchParameter>]

Reprotect a Hyper-V virtual machine after failback.



Required? true

Position? 0

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-LogStorageAccountId <String>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-MasterTarget <ASRMasterTargetServer>

Master Target Server Details.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ProcessServer <ASRProcessServer>

Process Server to be used for replication.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ProtectionContainerMapping <ASRProtectionContainerMapping>

Protection containerMapping to be used for replication.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-RecoveryAvailabilitySetId <String>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-RecoveryAzureStorageAccountId <String>

Specifies the ID of the Azure storage account to replicate to.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-RecoveryCloudServiceId <String>

The resource ID of the recovery cloud service to failover this virtual machine to.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-RecoveryPlan <ASRRecoveryPlan>

Specifies an ASR recovery plan object.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-RecoveryResourceGroupId <String>

Recovery resourceGroup id for protected Vm.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ReplicationProtectedItem <ASRReplicationProtectedItem>

Specifies an ASR replication protected item.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-RetentionVolume <ASRRetentionVolume>

Retention Volume on the master target server to be used.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-VMwareToAzure [<SwitchParameter>]

Update replication direction from VMware to Azure.



Required? true

Position? 0

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-VmmToVmm [<SwitchParameter>]

Update replication direction for a failed over Hyper-V virtual machine that is protected between two VMM managed Hyper-V sites.



Required? true

Position? 0

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

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



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRRecoveryPlan

Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRReplicationProtectedItem





OUTPUTS

Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRJob







NOTES









Example 1



PS C:\\> $currentJob = Update-AzureRmRecoveryServicesAsrProtectionDirection -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



PS C:\\> $currentJob = Update-AzureRmRecoveryServicesAsrProtectionDirection -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



PS C:\\> $currentJob = Update-AzureRmRecoveryServicesAsrProtectionDirection -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.







RELATED LINKS

Online Version:

https://docs.microsoft.com/en-us/powers ... ndirection