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

Starts an unplanned failover operation.

Syntax

Start-AzureRmRecoveryServicesAsrUnplannedFailoverJob
     [-DataEncryptionPrimaryCertFile <String>]
     [-DataEncryptionSecondaryCertFile <String>]
     -Direction <String>
     [-PerformSourceSideAction]
     -RecoveryPlan <ASRRecoveryPlan>
     [-Confirm]
     [-WhatIf]
     [<CommonParameters>]
Start-AzureRmRecoveryServicesAsrUnplannedFailoverJob
     [-DataEncryptionPrimaryCertFile <String>]
     [-DataEncryptionSecondaryCertFile <String>]
     -Direction <String>
     [-PerformSourceSideAction]
     -ReplicationProtectedItem <ASRReplicationProtectedItem>
     [-Confirm]
     [-WhatIf]
     [<CommonParameters>]

Description

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

Examples

Example 1

PS C:\> $currentJob = Start-AzureRmRecoveryServicesAsrUnplannedFailoverJob -RecoveryPlan $RP -Direction PrimaryToRecovery

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

Required Parameters

-Direction

Specifies the direction of the failover. 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 corresponding to the recovery plan on which the failover operation is to be performed.

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

Specifies the ASR replication protected item object corresponding to the replication protected item on which the failover operation is to be performed.

Type:ASRReplicationProtectedItem
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
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
-PerformSourceSideAction

Indicates that any source site operations specified in the recovery plan must be attempted to be performed as part of the fail over.

Type:SwitchParameter
Aliases:PerformSourceSideActions
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