Start-AzureSiteRecoveryProtectionProfileAssociationJob

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

Note

このドキュメントで参照されているコマンドレットは、Azure Service Manager (ASM) API を使用する従来の Azure リソースを管理するためのものです。 ASM の提供終了が予定されているため、新しいリソースを作成する場合、このレガシ PowerShell モジュールは推奨されません。 詳細については、Azure Service Manager の提供終了に関するページを参照してください

Az PowerShell モジュールは、PowerShell を使用して Azure Resource Manager (ARM) リソースを管理するために推奨される 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

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

型:ASRProtectionContainer
配置:Named
規定値:None
必須:True
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-Profile

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

型:AzureSMProfile
配置:Named
規定値:None
必須:False
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-ProtectionProfile

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

型:ASRProtectionProfile
配置:Named
規定値:None
必須:True
パイプライン入力を受け取る:True
ワイルドカード文字を受け取る:False

-RecoveryProtectionContainer

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

型:ASRProtectionContainer
配置:Named
規定値:None
必須:True
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False