< Back

Start-AzureRmRecoveryServicesAsrPlannedFailoverJob

Tue Jan 29, 2019 10:03 pm

NAME Start-AzureRmRecoveryServicesAsrPlannedFailoverJob



SYNOPSIS

Starts a planned failover operation.





SYNTAX

Start-AzureRmRecoveryServicesAsrPlannedFailoverJob [-Confirm] [-CreateVmIfNotFound {Yes | No}] [-DataEncryptionPrimaryCertFile <String>]

[-DataEncryptionSecondaryCertFile <String>] [-DefaultProfile <IAzureContextContainer>] -Direction {PrimaryToRecovery | RecoveryToPrimary}

[-Optimize {ForDownTime | ForSynchronization}] -RecoveryPlan <ASRRecoveryPlan> [-WhatIf] [<CommonParameters>]



Start-AzureRmRecoveryServicesAsrPlannedFailoverJob [-Confirm] [-CreateVmIfNotFound {Yes | No}] [-DataEncryptionPrimaryCertFile <String>]

[-DataEncryptionSecondaryCertFile <String>] [-DefaultProfile <IAzureContextContainer>] -Direction {PrimaryToRecovery | RecoveryToPrimary}

[-Optimize {ForDownTime | ForSynchronization}] -ReplicationProtectedItem <ASRReplicationProtectedItem> [-ServicesProvider

<ASRRecoveryServicesProvider>] [-WhatIf] [<CommonParameters>]





DESCRIPTION

The Start-AzureRmRecoveryServicesAsrPlannedFailoverJob 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-AzureRmRecoveryServicesAsrJob cmdlet.





PARAMETERS

-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-CreateVmIfNotFound <String>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-DataEncryptionPrimaryCertFile <String>

Specifies the primary certificate file.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-DataEncryptionSecondaryCertFile <String>

Specifies the secondary certificate file.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Direction <String>

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



- PrimaryToRecovery



- RecoveryToPrimary



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Optimize <String>

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.





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-RecoveryPlan <ASRRecoveryPlan>

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



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-ReplicationProtectedItem <ASRReplicationProtectedItem>

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



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-ServicesProvider <ASRRecoveryServicesProvider>

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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

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



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRRecoveryPlan

Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRReplicationProtectedItem





OUTPUTS

Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRJob







NOTES









Example 1



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



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







RELATED LINKS

Online Version:

https://docs.microsoft.com/en-us/powers ... ailoverjob