Start-​Azure​Site​Recovery​Protection​Profile​Association​Job

Starts a Site Recovery replication policy association job.

Syntax

Start-AzureSiteRecoveryProtectionProfileAssociationJob
     -PrimaryProtectionContainer <ASRProtectionContainer>
     [-Profile <AzureSMProfile>]
     -ProtectionProfile <ASRProtectionProfile>
     -RecoveryProtectionContainer <ASRProtectionContainer>
     [<CommonParameters>]

Description

The Start-AzureSiteRecoveryProtectionProfileAssociationJob cmdlet initiates an association job to associate a replication policy with an Azure Site Recovery protection container.

Examples

Example 1: Associate a protection profile

PS C:\> $ProtectionContainer01 = Get-AzureSiteRecoveryProtectionContainer -Id "5ba2ea95-856d-4033-9ca3-91e3e2c080b9"
PS C:\> $ProtectionProfile = New-AzureSiteRecoveryProtectionProfileObject -ReplicationProvider "HyperVReplica" -AllowReplicaDeletion -ApplicationConsistentSnapshotFrequencyInHours 1 -CompressionEnabled -RecoveryPoints 2 -ReplicationFrequencyInSeconds 30 -ReplicationMethod "Online" -ReplicationPort 8085 -ReplicationStartTime 1
PS C:\> $ProtectionContainer02 = Get-AzureSiteRecoveryProtectionContainer -Id "cf011f2a-aa19-443c-9f60-357f6b8afb77"
PS C:\> Start-AzureSiteRecoveryProtectionProfileAssociationJob -PrimaryProtectionContainer $ProtectionContainer01 -ProtectionProfile $ProtectionProfile -RecoveryProtectionContainer $ProtectionContainer02
Name             : MyProtectionProfile
ID               : 51978b0f-9241-4153-9171-2e19344f0805
ClientRequestId  : bb6f3200-b7c6-4c6f-bcbc-a70bb9946f03-2015-01-27 22:55:55Z-P
State            : InProgress
StateDescription : InProgress
StartTime        : 1/27/2015 10:56:01 PM
EndTime          : 
AllowedActions   : 
Tasks            : {Adding the protection group, Configuring Windows Server 2012 R2 Hyper-V hosts for Azure}
Errors           : {}

The first command gets a protection container by using the Get-AzureSiteRecoveryProtectionContainer cmdlet, and then stores that container in the $ProtectionContainer01 variable.

The second command creates a protection profile by using the New-AzureSiteRecoveryProtectionProfileObject cmdlet, and stores that protection profile in the $ProtectionProfile variable.

The third command gets a protection container, and then stores it in the $ProtectionContainer02 variable.

The final command associates the protection profile stored in $ProtectionProfile to the container stored in $ProtectionContainer01 as the primary protection container. The command associates the container stored in $ProtectionContainer02 as the recovery protection container.

Required Parameters

-PrimaryProtectionContainer

Specifies the primary protection container on which to apply the protection profile settings.

Type:ASRProtectionContainer
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ProtectionProfile

Specifies the protection profile settings to apply to the protection containers. To obtain an ASRProtectionProfile object, use the New-AzureSiteRecoveryProtectionProfileObject cmdlet.

Type:ASRProtectionProfile
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-RecoveryProtectionContainer

Specifies the recovery protection container on which to apply the protection profile settings.

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

Optional Parameters

-Profile

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

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