New-​Azure​Rm​Recovery​Services​Asr​Policy

Creates an Azure Site Recovery replication policy.

Syntax

New-AzureRmRecoveryServicesAsrPolicy
   [-ApplicationConsistentSnapshotFrequencyInHours <Int32>]
   [-Authentication <String>]
   [-Compression <String>]
   -Name <String>
   [-NumberOfRecoveryPointsToRetain <Int32>]
   [-ReplicaDeletion <String>]
   -ReplicationFrequencyInSeconds <String>
   [-ReplicationMethod <String>]
   -ReplicationPort <UInt16>
   -ReplicationProvider <String>
   [-ReplicationStartTime <TimeSpan>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]
New-AzureRmRecoveryServicesAsrPolicy
   [-ApplicationConsistentSnapshotFrequencyInHours <Int32>]
   [-Encryption <String>]
   -Name <String>
   [-NumberOfRecoveryPointsToRetain <Int32>]
   [-RecoveryAzureStorageAccountId <String>]
   -ReplicationFrequencyInSeconds <String>
   -ReplicationProvider <String>
   [-ReplicationStartTime <TimeSpan>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

The New-AzureRmRecoveryServicesAsrPolicy cmdlet creates an Azure Site Recovery replication policy. The replication policy is used to specify replication settings such as the replication frequency and number of recovery points.

Examples

Example 1

PS C:\> $currentJob = New-AzureRmRecoveryServicesAsrProtectionContainerMapping -Name $PolicyName -Policy $ProtectionProfile -PrimaryProtectionContainer $PrimaryContainer -RecoveryProtectionContainer $RecoveryContainer

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

Required Parameters

-Name

Specifies the name of the ASR replication policy.

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

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

  • 30
  • 300
  • 900
Type:String
Parameter Sets:30, 300, 900
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ReplicationPort

Specifies the port used for replication.

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

Specifies the replication provider. Valid values are:

  • HyperVReplica2012R2
  • HyperVReplica2012
  • HyperVReplicaAzure
Type:String
Parameter Sets:HyperVReplica2012R2, HyperVReplica2012, HyperVReplicaAzure
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-ApplicationConsistentSnapshotFrequencyInHours

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

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

Specifies the type of authentication used. Valid values are:

  • Certificate
  • Kerberos
Type:String
Parameter Sets:Certificate, Kerberos
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Compression

Specifies if compression should be enabled.

Type:String
Parameter Sets:Enable, Disable
Position:Named
Default value:None
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
Accept pipeline input:False
Accept wildcard characters:False
-Encryption

Specifies if encryption should be enabled or disabled.

Type:String
Parameter Sets:Enable, Disable
Position:Named
Default value:None
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
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
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
Parameter Sets:Required, NotRequired
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ReplicationMethod

Specifies the replication method. Valid values are:

  • Online
  • Offline
Type:String
Parameter Sets:Online, Offline
Position:Named
Default value:None
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:TimeSpan
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

None

Outputs

System.Object