Start-AzRecoveryServicesAsrTestFailoverJob

Starts a test failover operation.

Syntax

Start-AzRecoveryServicesAsrTestFailoverJob
     -ReplicationProtectedItem <ASRReplicationProtectedItem>
     -Direction <String>
     [-CloudServiceCreationOption <String>]
     [-DataEncryptionPrimaryCertFile <String>]
     [-DataEncryptionSecondaryCertFile <String>]
     [-RecoveryPoint <ASRRecoveryPoint>]
     [-DefaultProfile <IAzureContextContainer>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]
Start-AzRecoveryServicesAsrTestFailoverJob
     -RecoveryPlan <ASRRecoveryPlan>
     -Direction <String>
     [-CloudServiceCreationOption <String>]
     [-DataEncryptionPrimaryCertFile <String>]
     [-DataEncryptionSecondaryCertFile <String>]
     [-RecoveryTag <String>]
     [-DefaultProfile <IAzureContextContainer>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]
Start-AzRecoveryServicesAsrTestFailoverJob
     -RecoveryPlan <ASRRecoveryPlan>
     -Direction <String>
     -VMNetwork <ASRNetwork>
     [-DataEncryptionPrimaryCertFile <String>]
     [-DataEncryptionSecondaryCertFile <String>]
     [-RecoveryTag <String>]
     [-DefaultProfile <IAzureContextContainer>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]
Start-AzRecoveryServicesAsrTestFailoverJob
     -RecoveryPlan <ASRRecoveryPlan>
     -Direction <String>
     -AzureVMNetworkId <String>
     [-CloudServiceCreationOption <String>]
     [-DataEncryptionPrimaryCertFile <String>]
     [-DataEncryptionSecondaryCertFile <String>]
     [-RecoveryTag <String>]
     [-DefaultProfile <IAzureContextContainer>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]
Start-AzRecoveryServicesAsrTestFailoverJob
     -ReplicationProtectedItem <ASRReplicationProtectedItem>
     -Direction <String>
     -VMNetwork <ASRNetwork>
     [-DataEncryptionPrimaryCertFile <String>]
     [-DataEncryptionSecondaryCertFile <String>]
     [-RecoveryPoint <ASRRecoveryPoint>]
     [-DefaultProfile <IAzureContextContainer>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]
Start-AzRecoveryServicesAsrTestFailoverJob
     -ReplicationProtectedItem <ASRReplicationProtectedItem>
     -Direction <String>
     -AzureVMNetworkId <String>
     [-CloudServiceCreationOption <String>]
     [-DataEncryptionPrimaryCertFile <String>]
     [-DataEncryptionSecondaryCertFile <String>]
     [-RecoveryPoint <ASRRecoveryPoint>]
     [-DefaultProfile <IAzureContextContainer>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]

Description

The Start-AzRecoveryServicesAsrTestFailoverJob 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-AzRecoveryServicesAsrJob cmdlet.

Examples

Example 1

PS C:\> $currentJob = Start-AzRecoveryServicesAsrTestFailoverJob -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.

Parameters

-AzureVMNetworkId

{{Fill AzureVMNetworkId Description}}

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

Specifies whether a new cloud service should be created or the recovery cloud service configured for the VM should be used for the test failover.

Type:String
Accepted values:UseRecoveryCloudService, AutoCreateCloudService
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-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
-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
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
Accepted values: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
-RecoveryPoint

Specifies a custom recovery point to test failover the protected machine to.

Type:ASRRecoveryPoint
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RecoveryTag

Specifies the recovery tag to test failover to

Type:String
Accepted values:Latest, LatestAvailable, LatestAvailableApplicationConsistent
Position:Named
Default value:None
Accept pipeline input:False
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
-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

ASRRecoveryPlan

ASRReplicationProtectedItem

Outputs

ASRJob