Edit

Share via


Start-AzRecoveryServicesAsrPlannedFailoverJob

Starts a planned failover operation.

Syntax

ByRPIObject (Default)

Start-AzRecoveryServicesAsrPlannedFailoverJob
    -ReplicationProtectedItem <ASRReplicationProtectedItem>
    -Direction <String>
    [-Optimize <String>]
    [-CreateVmIfNotFound <String>]
    [-ServicesProvider <ASRRecoveryServicesProvider>]
    [-DataEncryptionPrimaryCertFile <String>]
    [-DataEncryptionSecondaryCertFile <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByRPObject

Start-AzRecoveryServicesAsrPlannedFailoverJob
    -RecoveryPlan <ASRRecoveryPlan>
    -Direction <String>
    [-Optimize <String>]
    [-CreateVmIfNotFound <String>]
    [-DataEncryptionPrimaryCertFile <String>]
    [-DataEncryptionSecondaryCertFile <String>]
    [-MultiVmSyncPoint <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByRPIObjectWithRecoveryTag

Start-AzRecoveryServicesAsrPlannedFailoverJob
    -ReplicationProtectedItem <ASRReplicationProtectedItem>
    -Direction <String>
    -RecoveryTag <String>
    [-Optimize <String>]
    [-CreateVmIfNotFound <String>]
    [-DataEncryptionPrimaryCertFile <String>]
    [-DataEncryptionSecondaryCertFile <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Start-AzRecoveryServicesAsrPlannedFailoverJob cmdlet starts a planned failover for an Azure Site Recovery replication protected item or recovery plan. You can check whether the job succeeds by using the Get-AzRecoveryServicesAsrJob cmdlet.

Examples

Example 1

$currentJob = Start-AzRecoveryServicesAsrPlannedFailoverJob -RecoveryPlan $RP -Direction PrimaryToRecovery

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

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

-CreateVmIfNotFound

Create the virtual machine if not found while failing back to the primary region (used in alternate ___location recovery.) The acceptable values for this parameter are:

  • Yes
  • No

Parameter properties

Type:String
Default value:None
Accepted values:Yes, No
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

-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 direction of the failover. 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

-Optimize

Specifies what to optimize for. This parameter applies when failover is done from an Azure site to an on-premise site which requires substantial data synchronization. Valid values are:

  • ForDowntime
  • ForSynchronization

When ForDowntime is specified, this indicates that data is synchronized before failover to minimize downtime. Synchronization is performed without shutting down the virtual machine. After synchronization is complete, the job is suspended. Resume the job to do an additional synchronization operation that shuts down the virtual machine.

When ForSynchronization is specified, this indicates that data is synchronized during failover only so data synchronization is minimized. With this setting enabled, the virtual machine is shut down immediately. Synchronization starts after shutdown to complete the failover operation.

Parameter properties

Type:String
Default value:None
Accepted values:ForDownTime, ForSynchronization
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

-RecoveryPlan

Specifies the ASR Recovery plan object corresponding to the recovery plan to be failed over.

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

-RecoveryTag

Specifies the recovery tag: RecoveryTagApplicationConsistent, RecoveryTagCrashConsistent (Applicable only for VMware to Azure replication scenario).

Parameter properties

Type:String
Default value:None
Accepted values:RecoveryTagApplicationConsistent, RecoveryTagCrashConsistent
Supports wildcards:False
DontShow:False

Parameter sets

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

-ReplicationProtectedItem

Specifies the ASR replication protected item object corresponding to the replication protected item to be failed over.

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

-ServicesProvider

Identifies the host to on which to create the virtual machine while failing over to an alternate ___location by specifying the ASR services provider object corresponding to the ASR services provider running on the host.

Parameter properties

Type:ASRRecoveryServicesProvider
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

-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