Start-AzureSiteRecoveryTestFailoverJob
Site Recovery 保護エンティティのテスト フェールオーバーを開始します。
注意
このドキュメントで参照されているコマンドレットは、Service Management API を使用するレガシ Azure リソースを管理するためのものです。 Azure Resource Manager リソースを管理するためのコマンドレットについては、Az PowerShell モジュールを参照してください。
構文
Start-AzureSiteRecoveryTestFailoverJob
[-Network <ASRNetwork>]
[-NetworkType <String>]
-Direction <String>
-ProtectionEntityId <String>
-ProtectionContainerId <String>
[-WaitForCompletion]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
-RpId <String>
[-Network <ASRNetwork>]
[-NetworkType <String>]
-Direction <String>
[-WaitForCompletion]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
-RpId <String>
[-Network <ASRNetwork>]
[-NetworkType <String>]
-Direction <String>
[-WaitForCompletion]
-LogicalNetworkId <String>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
-RpId <String>
[-Network <ASRNetwork>]
[-NetworkType <String>]
-Direction <String>
[-WaitForCompletion]
-VmNetworkId <String>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
-RpId <String>
-Network <ASRNetwork>
[-NetworkType <String>]
-Direction <String>
[-WaitForCompletion]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
-Network <ASRNetwork>
[-NetworkType <String>]
-Direction <String>
-ProtectionEntity <ASRProtectionEntity>
[-WaitForCompletion]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
-Network <ASRNetwork>
[-NetworkType <String>]
-RecoveryPlan <ASRRecoveryPlan>
-Direction <String>
[-WaitForCompletion]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
-Network <ASRNetwork>
[-NetworkType <String>]
-Direction <String>
-ProtectionEntityId <String>
-ProtectionContainerId <String>
[-WaitForCompletion]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
[-Network <ASRNetwork>]
[-NetworkType <String>]
-RecoveryPlan <ASRRecoveryPlan>
-Direction <String>
[-WaitForCompletion]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
[-Network <ASRNetwork>]
[-NetworkType <String>]
-RecoveryPlan <ASRRecoveryPlan>
-Direction <String>
[-WaitForCompletion]
-LogicalNetworkId <String>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
[-Network <ASRNetwork>]
[-NetworkType <String>]
-RecoveryPlan <ASRRecoveryPlan>
-Direction <String>
[-WaitForCompletion]
-VmNetworkId <String>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
[-Network <ASRNetwork>]
[-NetworkType <String>]
-Direction <String>
-ProtectionEntityId <String>
-ProtectionContainerId <String>
[-WaitForCompletion]
-LogicalNetworkId <String>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
[-Network <ASRNetwork>]
[-NetworkType <String>]
-Direction <String>
-ProtectionEntityId <String>
-ProtectionContainerId <String>
[-WaitForCompletion]
-VmNetworkId <String>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
[-Network <ASRNetwork>]
[-NetworkType <String>]
-Direction <String>
-ProtectionEntity <ASRProtectionEntity>
[-WaitForCompletion]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
[-Network <ASRNetwork>]
[-NetworkType <String>]
-Direction <String>
-ProtectionEntity <ASRProtectionEntity>
[-WaitForCompletion]
-LogicalNetworkId <String>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
[-Network <ASRNetwork>]
[-NetworkType <String>]
-Direction <String>
-ProtectionEntity <ASRProtectionEntity>
[-WaitForCompletion]
-VmNetworkId <String>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
説明
Start-AzureSiteRecoveryTestFailoverJob コマンドレットは、Azure Site Recovery 保護エンティティまたは復旧計画のテスト フェールオーバーを開始します。 Get-AzureRMSiteRecoveryJob コマンドレットを使用して、ジョブが成功したかどうかを確認できます。
例
例 1: テスト フェールオーバーを開始する
PS C:\> $ProtectionContainer = Get-AzureSiteRecoveryProtectionContainer
PS C:\> $ProtectionEntity = Get-AzureSiteRecoveryProtectionEntity -ProtectionContainer $ProtectionContainer
PS C:\> Start-AzureSiteRecoveryTestFailoverJob -ProtectionEntity $ProtectionEntity -Direction "PrimaryToRecovery"
ID : c38eecdc-731c-405b-a61c-08db99aae2fe
ClientRequestId : 32ace403-0916-4967-83a1-529176bd6e88-2014-49-06 15:49:24Z-P
State : NotStarted
StateDescription : NotStarted
StartTime :
EndTime :
AllowedActions : {}
Name :
Tasks : {}
Errors : {}
最初のコマンドでは、 Get-AzureSiteRecoveryProtectionContainer コマンドレットを使用して保護されたコンテナーを取得し、$ProtectionContainer変数に格納します。
2 番目のコマンドは、Get-AzureSiteRecoveryProtectionEntity コマンドレットを使用して、$ProtectionContainerに格納されている保護されたコンテナーに属する保護されたエンティティを取得します。 このコマンドは、結果を $ProtectionEntity 変数に格納します。
最後のコマンドは、$ProtectionEntityに格納されている保護されたエンティティのテスト フェールオーバー操作を開始し、フェールオーバーの方向を指定します。
例 2: 復旧計画を使用してテスト フェールオーバーを開始する
PS C:\> $RecoveryPlan = Get-AzureSiteRecoveryRecoveryPlan -Name "RecoveryPlan01"
Start-AzureSiteRecoveryTestFailoverJob -Direction PrimaryToRecovery -RecoveryPlan $RecoveryPlan
このコマンドは、Get-AzureSiteRecoveryRecoveryPlan コマンドレットを使用して、現在の Azure Site Recovery コンテナーの RecoveryPlan01 という名前の復旧計画を取得します。 このコマンドは、プランを $RecoveryPlan 変数に格納します。
2 番目のコマンドは、$RecoveryPlanに格納されている復旧計画のテスト フェールオーバー操作を開始し、フェールオーバーの方向を指定します。
パラメーター
-Direction
フェールオーバーの方向を指定します。 このパラメーターの有効値は、次のとおりです。
- PrimaryToRecovery
- RecoveryToPrimary
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LogicalNetworkId
論理ネットワークの ID を指定します。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Network
テスト フェールオーバーに使用するネットワーク オブジェクトを指定します。 ネットワークを取得するには、Get-AzureSiteRecoveryNetwork コマンドレットを使用します。
Type: | ASRNetwork |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NetworkType
テスト フェールオーバーに使用するネットワークの種類を指定します。 このパラメーターの有効値は、次のとおりです。
- なし
- [新規作成]
- Existing
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
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 |
-ProtectionContainerId
保護されたコンテナーの ID を指定します。 このコマンドレットは、このコマンドレットが指定するコンテナーに属する保護された仮想マシンのジョブを開始します。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ProtectionEntity
Site Recovery 保護エンティティ オブジェクトを指定します。
Type: | ASRProtectionEntity |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ProtectionEntityId
ジョブを開始する保護された仮想マシンの ID を指定します。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RecoveryPlan
ジョブを開始する復旧計画を指定します。
Type: | ASRRecoveryPlan |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RpId
ジョブを開始する復旧計画の ID を指定します。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VmNetworkId
仮想マシン ネットワークの ID を指定します。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WaitForCompletion
Windows PowerShell コンソールに制御を返す前に、コマンドレットが操作の完了を待機することを示します。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |