Share via


Start-AzureSiteRecoveryProtectionProfileAssociationJob

Site Recovery レプリケーション ポリシーの関連付けジョブを開始します。

注意

このドキュメントで参照されているコマンドレットは、Service Management API を使用するレガシ Azure リソースを管理するためのものです。 Azure Resource Manager リソースを管理するためのコマンドレットについては、Az PowerShell モジュールを参照してください。

構文

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

説明

Start-AzureSiteRecoveryProtectionProfileAssociationJob コマンドレットは、レプリケーション ポリシーを Azure Site Recovery 保護コンテナーに関連付ける関連付けジョブを開始します。

例 1: 保護プロファイルを関連付ける

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           : {}

最初のコマンドは、Get-AzureSiteRecoveryProtectionContainer コマンドレットを使用して保護コンテナーを取得し、そのコンテナーを $ProtectionContainer 01 変数に格納します。

2 番目のコマンドは、New-AzureSiteRecoveryProtectionProfileObject コマンドレットを使用して保護プロファイルを作成し、その保護プロファイルを$ProtectionProfile変数に格納します。

3 番目のコマンドは、保護コンテナーを取得し、$ProtectionContainer 02 変数に格納します。

最後のコマンドは、$ProtectionProfileに格納されている保護プロファイルを、プライマリ保護コンテナーとして $ProtectionContainer 01 に格納されているコンテナーに関連付けます。 このコマンドは、$ProtectionContainer 02 に格納されているコンテナーを回復保護コンテナーとして関連付けます。

パラメーター

-PrimaryProtectionContainer

保護プロファイル設定を適用するプライマリ保護コンテナーを指定します。

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

-Profile

このコマンドレットが読み取る Azure プロファイルを指定します。 プロファイルを指定しない場合、このコマンドレットはローカルの既定のプロファイルから読み取ります。

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

-ProtectionProfile

保護コンテナーに適用する保護プロファイルの設定を指定します。 ASRProtectionProfile オブジェクトを取得するには、New-AzureSiteRecoveryProtectionProfileObject コマンドレットを使用します。

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

-RecoveryProtectionContainer

保護プロファイル設定を適用する回復保護コンテナーを指定します。

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