Edit

Share via


Start-AzRecoveryServicesAsrTestFailoverJob

Starts a test failover operation.

Syntax

ByRPIObject (Default)

Start-AzRecoveryServicesAsrTestFailoverJob
    -ReplicationProtectedItem <ASRReplicationProtectedItem>
    -Direction <String>
    [-CloudServiceCreationOption <String>]
    [-DataEncryptionPrimaryCertFile <String>]
    [-DataEncryptionSecondaryCertFile <String>]
    [-RecoveryPoint <ASRRecoveryPoint>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByRPObject

Start-AzRecoveryServicesAsrTestFailoverJob
    -RecoveryPlan <ASRRecoveryPlan>
    -Direction <String>
    [-CloudServiceCreationOption <String>]
    [-DataEncryptionPrimaryCertFile <String>]
    [-DataEncryptionSecondaryCertFile <String>]
    [-RecoveryTag <String>]
    [-MultiVmSyncPoint <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByRPObjectWithVMNetwork

Start-AzRecoveryServicesAsrTestFailoverJob
    -RecoveryPlan <ASRRecoveryPlan>
    -Direction <String>
    -VMNetwork <ASRNetwork>
    [-DataEncryptionPrimaryCertFile <String>]
    [-DataEncryptionSecondaryCertFile <String>]
    [-RecoveryTag <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByRPObjectWithAzureVMNetworkId

Start-AzRecoveryServicesAsrTestFailoverJob
    -RecoveryPlan <ASRRecoveryPlan>
    -Direction <String>
    -AzureVMNetworkId <String>
    [-CloudServiceCreationOption <String>]
    [-DataEncryptionPrimaryCertFile <String>]
    [-DataEncryptionSecondaryCertFile <String>]
    [-RecoveryTag <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByRPIObjectWithVMNetwork

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

ByRPIObjectWithAzureVMNetworkId

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

$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.

Example 2

Starts a test failover operation. (autogenerated)

Start-AzRecoveryServicesAsrTestFailoverJob -AzureVMNetworkId <String> -Direction PrimaryToRecovery -RecoveryPlan $RP

Parameters

-AzureVMNetworkId

Specifies the Azure vm network id for recovery VM after failover.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByRPObjectWithAzureVMNetworkId
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByRPIObjectWithAzureVMNetworkId
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:String
Default value:None
Accepted values:UseRecoveryCloudService, AutoCreateCloudService
Supports wildcards:False
DontShow:False

Parameter sets

ByRPIObject
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByRPObject
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByRPObjectWithAzureVMNetworkId
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByRPIObjectWithAzureVMNetworkId
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DataEncryptionPrimaryCertFile

Specifies the primary certificate file.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DataEncryptionSecondaryCertFile

Specifies the secondary certificate file.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

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

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Direction

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

  • PrimaryToRecovery
  • RecoveryToPrimary

Parameter properties

Type:String
Default value:None
Accepted values:PrimaryToRecovery, RecoveryToPrimary
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MultiVmSyncPoint

Specifies whether to enable multi VM sync points for failover of multi VM sync enabled VMs (Applicable only for VMware to Azure replication scenario).

Parameter properties

Type:String
Default value:None
Accepted values:Enable, Disable
Supports wildcards:False
DontShow:False

Parameter sets

ByRPObject
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RecoveryPlan

Specifies an ASR recovery plan object.

Parameter properties

Type:ASRRecoveryPlan
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByRPObject
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
ByRPObjectWithVMNetwork
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
ByRPObjectWithAzureVMNetworkId
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-RecoveryPoint

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

Parameter properties

Type:ASRRecoveryPoint
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByRPIObject
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByRPIObjectWithVMNetwork
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByRPIObjectWithAzureVMNetworkId
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RecoveryTag

Specifies the recovery tag to test failover to

Parameter properties

Type:String
Default value:None
Accepted values:Latest, LatestAvailable, LatestAvailableApplicationConsistent
Supports wildcards:False
DontShow:False

Parameter sets

ByRPObject
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByRPObjectWithVMNetwork
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByRPObjectWithAzureVMNetworkId
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ReplicationProtectedItem

Specifies an ASR replication protected item.

Parameter properties

Type:ASRReplicationProtectedItem
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByRPIObject
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
ByRPIObjectWithVMNetwork
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
ByRPIObjectWithAzureVMNetworkId
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-VMNetwork

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

Parameter properties

Type:ASRNetwork
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByRPObjectWithVMNetwork
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ByRPIObjectWithVMNetwork
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

ASRRecoveryPlan

ASRReplicationProtectedItem

Outputs

ASRJob