Update-AzureRmRecoveryServicesAsrPolicy

Updates an Azure Site Recovery replication policy.

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

Syntax

Update-AzureRmRecoveryServicesAsrPolicy
      -InputObject <ASRPolicy>
      [-ReplicationMethod <String>]
      [-ReplicationFrequencyInSeconds <String>]
      [-NumberOfRecoveryPointsToRetain <Int32>]
      [-ApplicationConsistentSnapshotFrequencyInHours <Int32>]
      [-Compression <String>]
      [-ReplicationPort <UInt16>]
      [-Authentication <String>]
      [-ReplicationStartTime <TimeSpan>]
      [-ReplicaDeletion <String>]
      [-RecoveryAzureStorageAccountId <String>]
      [-Encryption <String>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzureRmRecoveryServicesAsrPolicy
      [-VMwareToAzure]
      -InputObject <ASRPolicy>
      [-RecoveryPointRetentionInHours <Int32>]
      [-ApplicationConsistentSnapshotFrequencyInHours <Int32>]
      [-MultiVmSyncStatus <String>]
      [-RPOWarningThresholdInMinutes <Int32>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzureRmRecoveryServicesAsrPolicy
      [-AzureToAzure]
      -InputObject <ASRPolicy>
      [-RecoveryPointRetentionInHours <Int32>]
      [-ApplicationConsistentSnapshotFrequencyInHours <Int32>]
      [-MultiVmSyncStatus <String>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzureRmRecoveryServicesAsrPolicy
      [-AzureToVMware]
      -InputObject <ASRPolicy>
      [-RecoveryPointRetentionInHours <Int32>]
      [-ApplicationConsistentSnapshotFrequencyInHours <Int32>]
      [-MultiVmSyncStatus <String>]
      [-RPOWarningThresholdInMinutes <Int32>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzureRmRecoveryServicesAsrPolicy
      [-HyperVToAzure]
      -InputObject <ASRPolicy>
      [-ReplicationFrequencyInSeconds <String>]
      [-NumberOfRecoveryPointsToRetain <Int32>]
      [-ApplicationConsistentSnapshotFrequencyInHours <Int32>]
      [-ReplicationStartTime <TimeSpan>]
      [-RecoveryAzureStorageAccountId <String>]
      [-Encryption <String>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzureRmRecoveryServicesAsrPolicy
      [-VmmToVmm]
      -InputObject <ASRPolicy>
      [-ReplicationMethod <String>]
      [-ReplicationFrequencyInSeconds <String>]
      [-NumberOfRecoveryPointsToRetain <Int32>]
      [-ApplicationConsistentSnapshotFrequencyInHours <Int32>]
      [-Compression <String>]
      [-ReplicationPort <UInt16>]
      [-Authentication <String>]
      [-ReplicationStartTime <TimeSpan>]
      [-ReplicaDeletion <String>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Update-AzureRmRecoveryServicesAsrPolicy cmdlet updates the specified Azure Site Recovery replication policy.

Examples

Example 1

PS C:\> $currentJob = Update-AzureRmRecoveryServicesAsrPolicy -Policy $Policy -ReplicationFrequencyInSeconds 900

Starts the update replication policy operation using the specified parameters and returns the ASR job used to track the operation.

Example 2

PS C:\> Update-AzureRmRecoveryServicesAsrPolicy -AzureToAzure -InputObject $Policy -ReplicationFrequencyInSeconds 900

Starts the update azure to azure replication policy operation using the specified parameters and returns the ASR job used to track the operation.

Example 3

PS C:\> $currentJob = Update-AzureRmRecoveryServicesAsrPolicy -AzureToAzure -InputObject $Policy -RecoveryPointRetentionInHours 20

Starts the update azure to azure replication policy using the specified parameters and returns the ASR job used to track the operation.

Parameters

-ApplicationConsistentSnapshotFrequencyInHours

Specifies the frequency(in hours) at which to create application consistent recovery points.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Authentication

Specifies the type of authentication used.

Type:String
Accepted values:Certificate, Kerberos
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-AzureToAzure

Switch parameter specifying that the replication policy used to replicate Azure virtual machines between two Azure regions will be updated.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-AzureToVMware

Switch parameter indicating that the specfied policy is used to replicate failed over virtual machines running in Azure back to an on-premises VMware site.

Type:SwitchParameter
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Compression

Specifies if compression should be enabled.

Type:String
Accepted values:Enable, Disable
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Encryption

{{Fill Encryption Description}}

Type:String
Accepted values:Enable, Disable
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-HyperVToAzure

Switch parameter indicating that the specfied policy is used to replicate Hyper-V virtual machines to Azure.

Type:SwitchParameter
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Input object for the cmdlet: Specifies the ASR replication policy object corresponding to the replication policy to be updated.

Type:ASRPolicy
Aliases:Policy
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-MultiVmSyncStatus

Specifies multiVm sync status for the policy.

Type:String
Accepted values:Enable, Disable
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-NumberOfRecoveryPointsToRetain

Specifies the number recovery points to retain.

Type:Int32
Aliases:RecoveryPoints
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RecoveryAzureStorageAccountId

Specifies the Azure storage account ID of the replication target. Used as the target storage account for replication if an alternate is not provided while enabling replication using the New-AzureRmRecoveryServicesASRReplicationProtectedItem cmdlet.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RecoveryPointRetentionInHours

Time in hours to retain recovery points after creation.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ReplicaDeletion

Specifies if the replica virtual machine should be deleted on disabling replication from a VMM managed site to another.

Type:String
Accepted values:Required, NotRequired
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ReplicationFrequencyInSeconds

Specifies the replication frequency interval in seconds. Valid values are:

  • 30
  • 300
  • 900
Type:String
Accepted values:30, 300, 900
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ReplicationMethod

Specifies the replication method.

Type:String
Accepted values:Online, Offline
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ReplicationPort

Specifies the port used for replication.

Type:UInt16
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ReplicationStartTime

Specifies the replication start time. It must be no later than 24-hours from the start of the job.

Type:Nullable<T>[TimeSpan]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RPOWarningThresholdInMinutes

The RPO threshold value in minutes to warn on.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VmmToVmm

Switch parameter indicating that the specfied policy is used to replicate VMM managed Hyper-V virtual machines between two Hyper-V sites.

Type:SwitchParameter
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-VMwareToAzure

Switch parameter indicating that the specfied policy is used to replicate VMware virtual machines to Azure.

Type:SwitchParameter
Position:0
Default value:None
Required:True
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

ASRPolicy

Outputs

Object