Start-AzureRmRecoveryServicesAsrUnplannedFailoverJob
Starts a unplanned failover operation.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
Start-AzureRmRecoveryServicesAsrUnplannedFailoverJob
-ReplicationProtectedItem <ASRReplicationProtectedItem>
-Direction <String>
[-PerformSourceSideAction]
[-DataEncryptionPrimaryCertFile <String>]
[-DataEncryptionSecondaryCertFile <String>]
[-RecoveryPoint <ASRRecoveryPoint>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Start-AzureRmRecoveryServicesAsrUnplannedFailoverJob
-RecoveryPlan <ASRRecoveryPlan>
-Direction <String>
[-PerformSourceSideAction]
[-DataEncryptionPrimaryCertFile <String>]
[-DataEncryptionSecondaryCertFile <String>]
[-RecoveryTag <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Start-AzureRmRecoveryServicesAsrUnplannedFailoverJob
-ReplicationProtectedItem <ASRReplicationProtectedItem>
-Direction <String>
[-PerformSourceSideAction]
[-DataEncryptionPrimaryCertFile <String>]
[-DataEncryptionSecondaryCertFile <String>]
-RecoveryTag <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Start-AzureRmRecoveryServicesAsrTestFailoverJob 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-AzureRmRecoveryServicesAsrJob cmdlet.
Examples
Example 1
PS C:\> $currentJob = Start-AzureRmRecoveryServicesAsrTestFailoverJob -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.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DataEncryptionPrimaryCertFile
Specifies the data encryption primary certificate file path for failover of Protected Item.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DataEncryptionSecondaryCertFile
Specifies the data encryption secondary certificate file path for failover of Protected Item.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Direction
Specifies the failover direction. The acceptable values for this parameter are:
- PrimaryToRecovery
- RecoveryToPrimary
Type: | String |
Accepted values: | PrimaryToRecovery, RecoveryToPrimary |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PerformSourceSideAction
Perform operation in source side before starting unplanned failover.
Type: | SwitchParameter |
Aliases: | PerformSourceSideActions |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RecoveryPlan
Specifies an ASR recovery plan object.
Type: | ASRRecoveryPlan |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-RecoveryPoint
Specifies a custom recovery point to failover the protected machine to.
Type: | ASRRecoveryPoint |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RecoveryTag
Specifies the recovery tag to failover to.
Type: | String |
Accepted values: | Latest, LatestAvailable, LatestAvailableApplicationConsistent, LatestAvailableCrashConsistent, Latest, LatestAvailable, LatestAvailableApplicationConsistent, LatestAvailableCrashConsistent, Latest, LatestAvailable, LatestAvailableApplicationConsistent, LatestAvailableCrashConsistent, Latest, LatestAvailable, LatestAvailableApplicationConsistent, LatestAvailableCrashConsistent |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ReplicationProtectedItem
Specifies an azure site recovery replication protected item.
Type: | ASRReplicationProtectedItem |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRReplicationProtectedItem