Edit

Share via


Start-AzRecoveryServicesAsrUnplannedFailoverJob

Starts an unplanned failover operation.

Syntax

ByRPIObject (Default)

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

ByRPObject

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

ByRPIObjectWithRecoveryTag

Start-AzRecoveryServicesAsrUnplannedFailoverJob
    -ReplicationProtectedItem <ASRReplicationProtectedItem>
    -Direction <String>
    -RecoveryTag <String>
    [-PerformSourceSideAction]
    [-DataEncryptionPrimaryCertFile <String>]
    [-DataEncryptionSecondaryCertFile <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Start-AzRecoveryServicesAsrUnplannedFailoverJob cmdlet starts unplanned 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

Start-AzRecoveryServicesAsrUnplannedFailoverJob -RecoveryPlan $RP -Direction PrimaryToRecovery

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

Example 2

Starts an unplanned failover operation. (autogenerated)

Start-AzRecoveryServicesAsrUnplannedFailoverJob -Direction PrimaryToRecovery -RecoveryPoint $rp[0] -ReplicationProtectedItem $ReplicationProtectedItem

Parameters

-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 data encryption primary certificate file path for failover of Protected Item.

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 data encryption secondary certificate file path for failover of Protected Item.

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

-PerformSourceSideAction

Perform operation in source side before starting unplanned failover.

Parameter properties

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

Parameter sets

(All)
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

-RecoveryPoint

Specifies a custom recovery point to failover the protected machine to. If not specified, ASR will process the pending writes and pick the latest recovery point (lowest RPO).

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

-RecoveryTag

Specifies the recovery tag to failover to.

Parameter properties

Type:String
Default value:None
Accepted values:Latest, LatestAvailable, LatestAvailableApplicationConsistent, LatestAvailableCrashConsistent
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

-ReplicationProtectedItem

Specifies an azure site recovery 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
ByRPIObjectWithRecoveryTag
Position:Named
Mandatory:True
Value from pipeline:True
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