Start-​Azure​Rm​Recovery​Services​Asr​Test​Failover​Job

Starts a test failover operation.

Syntax

Start-AzureRmRecoveryServicesAsrTestFailoverJob
     -AzureVMNetworkId <String>
     [-DataEncryptionPrimaryCertFile <String>]
     [-DataEncryptionSecondaryCertFile <String>]
     -Direction <String>
     -RecoveryPlan <ASRRecoveryPlan>
     [-Confirm]
     [-WhatIf]
     [<CommonParameters>]
Start-AzureRmRecoveryServicesAsrTestFailoverJob
     -AzureVMNetworkId <String>
     [-DataEncryptionPrimaryCertFile <String>]
     [-DataEncryptionSecondaryCertFile <String>]
     -Direction <String>
     -ReplicationProtectedItem <ASRReplicationProtectedItem>
     [-Confirm]
     [-WhatIf]
     [<CommonParameters>]
Start-AzureRmRecoveryServicesAsrTestFailoverJob
     [-DataEncryptionPrimaryCertFile <String>]
     [-DataEncryptionSecondaryCertFile <String>]
     -Direction <String>
     -RecoveryPlan <ASRRecoveryPlan>
     [-Confirm]
     [-WhatIf]
     [<CommonParameters>]
Start-AzureRmRecoveryServicesAsrTestFailoverJob
     [-DataEncryptionPrimaryCertFile <String>]
     [-DataEncryptionSecondaryCertFile <String>]
     -Direction <String>
     -RecoveryPlan <ASRRecoveryPlan>
     -VMNetwork <ASRNetwork>
     [-Confirm]
     [-WhatIf]
     [<CommonParameters>]
Start-AzureRmRecoveryServicesAsrTestFailoverJob
     [-DataEncryptionPrimaryCertFile <String>]
     [-DataEncryptionSecondaryCertFile <String>]
     -Direction <String>
     -ReplicationProtectedItem <ASRReplicationProtectedItem>
     [-Confirm]
     [-WhatIf]
     [<CommonParameters>]
Start-AzureRmRecoveryServicesAsrTestFailoverJob
     [-DataEncryptionPrimaryCertFile <String>]
     [-DataEncryptionSecondaryCertFile <String>]
     -Direction <String>
     -ReplicationProtectedItem <ASRReplicationProtectedItem>
     -VMNetwork <ASRNetwork>
     [-Confirm]
     [-WhatIf]
     [<CommonParameters>]

Description

The Start-AzureRmRecoveryServicesAsrTestFailoverJob cmdlet starts test failover of an Azure Site Recovery replication protected item or recovery plan. You can check whether the job succeeded by using the Get-AzureRmRecoveryServicesAsrJob cmdlet.

Examples

Example 1

PS C:\> $currentJob = Start-AzureRmRecoveryServicesAsrTestFailoverJob -RecoveryPlan $RP -Direction PrimaryToRecovery -VMNetwork $TestRecoveryNetwork

Starts the test failover operation for the recovery plan with the specified parameters and returns the ASR job used to track the operation.

Required Parameters

-AzureVMNetworkId

Specifies the Azure virtual network ID to connect the test fail over virtual machine(s) to.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Direction

Specifies the failover direction. The acceptable values for this parameter are:

  • PrimaryToRecovery
  • RecoveryToPrimary
Type:String
Parameter Sets:PrimaryToRecovery, RecoveryToPrimary
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RecoveryPlan

Specifies an ASR recovery plan object.

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

Specifies an ASR replication protected item.

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

Specifies the Site Recovery virtual machine network to connect the test failover virtual machine(s) to.

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

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DataEncryptionPrimaryCertFile

Specifies the primary certificate file.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DataEncryptionSecondaryCertFile

Specifies the secondary certificate file.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRRecoveryPlan

Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRReplicationProtectedItem

Outputs

Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRJob