Start-AzureSiteRecoveryProtectionProfileAssociationJob
Startar ett site recovery-replikeringsprincipassociationsjobb.
Kommentar
De cmdletar som refereras i den här dokumentationen är till för att hantera äldre Azure-resurser som använder Service Management-API:er. Se Az PowerShell-modulen för cmdletar för att hantera Azure Resource Manager-resurser.
Syntax
Start-AzureSiteRecoveryProtectionProfileAssociationJob
-ProtectionProfile <ASRProtectionProfile>
-PrimaryProtectionContainer <ASRProtectionContainer>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Start-AzureSiteRecoveryProtectionProfileAssociationJob
-ProtectionProfile <ASRProtectionProfile>
-PrimaryProtectionContainer <ASRProtectionContainer>
-RecoveryProtectionContainer <ASRProtectionContainer>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Description
Cmdleten Start-AzureSiteRecoveryProtectionProfileAssociationJob initierar ett associationsjobb för att associera en replikeringsprincip med en Azure Site Recovery-skyddscontainer.
Exempel
Exempel 1: Associera en skyddsprofil
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 : {}
Det första kommandot hämtar en skyddscontainer med hjälp av cmdleten Get-AzureSiteRecoveryProtectionContainer och lagrar sedan containern i variabeln $ProtectionContainer 01.
Det andra kommandot skapar en skyddsprofil med hjälp av cmdleten New-AzureSiteRecoveryProtectionProfileObject och lagrar skyddsprofilen i variabeln $ProtectionProfile.
Det tredje kommandot hämtar en skyddscontainer och lagrar den sedan i variabeln $ProtectionContainer 02.
Det sista kommandot associerar skyddsprofilen som lagras i $ProtectionProfile till containern som lagras i $ProtectionContainer 01 som den primära skyddscontainern. Kommandot associerar containern som lagras i $ProtectionContainer 02 som återställningsskyddscontainer.
Parametrar
-PrimaryProtectionContainer
Anger den primära skyddscontainern som skyddsprofilinställningarna ska tillämpas på.
Type: | ASRProtectionContainer |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Profile
Anger den Azure-profil som den här cmdleten läser från. Om du inte anger någon profil läser den här cmdleten från den lokala standardprofilen.
Type: | AzureSMProfile |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ProtectionProfile
Anger de skyddsprofilinställningar som ska tillämpas på skyddscontainrarna. Om du vill hämta ett ASRProtectionProfile-objekt använder du cmdleten New-AzureSiteRecoveryProtectionProfileObject.
Type: | ASRProtectionProfile |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-RecoveryProtectionContainer
Anger den återställningsskyddscontainer som skyddsprofilinställningarna ska tillämpas på.
Type: | ASRProtectionContainer |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |