Start-AzureSiteRecoveryTestFailoverJob

Startet ein Testfailover für eine Site Recovery Protection-Entität.

Hinweis

Die in dieser Dokumentation referenzierten Cmdlets dienen zum Verwalten von älteren Azure-Ressourcen, die Azure Service Manager (ASM)-APIs verwenden. Dieses ältere PowerShell-Modul wird beim Erstellen neuer Ressourcen nicht empfohlen, da ASM für den Ruhestand geplant ist. Weitere Informationen finden Sie unter Einstellung des Azure Service Manager.

Das Az PowerShell-Modul ist das empfohlene PowerShell-Modul zum Verwalten von Azure Resource Manager (ARM)-Ressourcen mit PowerShell.

Syntax

Start-AzureSiteRecoveryTestFailoverJob
     [-Network <ASRNetwork>]
     [-NetworkType <String>]
     -Direction <String>
     -ProtectionEntityId <String>
     -ProtectionContainerId <String>
     [-WaitForCompletion]
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     -RpId <String>
     [-Network <ASRNetwork>]
     [-NetworkType <String>]
     -Direction <String>
     [-WaitForCompletion]
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     -RpId <String>
     [-Network <ASRNetwork>]
     [-NetworkType <String>]
     -Direction <String>
     [-WaitForCompletion]
     -LogicalNetworkId <String>
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     -RpId <String>
     [-Network <ASRNetwork>]
     [-NetworkType <String>]
     -Direction <String>
     [-WaitForCompletion]
     -VmNetworkId <String>
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     -RpId <String>
     -Network <ASRNetwork>
     [-NetworkType <String>]
     -Direction <String>
     [-WaitForCompletion]
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     -Network <ASRNetwork>
     [-NetworkType <String>]
     -Direction <String>
     -ProtectionEntity <ASRProtectionEntity>
     [-WaitForCompletion]
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     -Network <ASRNetwork>
     [-NetworkType <String>]
     -RecoveryPlan <ASRRecoveryPlan>
     -Direction <String>
     [-WaitForCompletion]
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     -Network <ASRNetwork>
     [-NetworkType <String>]
     -Direction <String>
     -ProtectionEntityId <String>
     -ProtectionContainerId <String>
     [-WaitForCompletion]
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     [-Network <ASRNetwork>]
     [-NetworkType <String>]
     -RecoveryPlan <ASRRecoveryPlan>
     -Direction <String>
     [-WaitForCompletion]
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     [-Network <ASRNetwork>]
     [-NetworkType <String>]
     -RecoveryPlan <ASRRecoveryPlan>
     -Direction <String>
     [-WaitForCompletion]
     -LogicalNetworkId <String>
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     [-Network <ASRNetwork>]
     [-NetworkType <String>]
     -RecoveryPlan <ASRRecoveryPlan>
     -Direction <String>
     [-WaitForCompletion]
     -VmNetworkId <String>
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     [-Network <ASRNetwork>]
     [-NetworkType <String>]
     -Direction <String>
     -ProtectionEntityId <String>
     -ProtectionContainerId <String>
     [-WaitForCompletion]
     -LogicalNetworkId <String>
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     [-Network <ASRNetwork>]
     [-NetworkType <String>]
     -Direction <String>
     -ProtectionEntityId <String>
     -ProtectionContainerId <String>
     [-WaitForCompletion]
     -VmNetworkId <String>
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     [-Network <ASRNetwork>]
     [-NetworkType <String>]
     -Direction <String>
     -ProtectionEntity <ASRProtectionEntity>
     [-WaitForCompletion]
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     [-Network <ASRNetwork>]
     [-NetworkType <String>]
     -Direction <String>
     -ProtectionEntity <ASRProtectionEntity>
     [-WaitForCompletion]
     -LogicalNetworkId <String>
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]
Start-AzureSiteRecoveryTestFailoverJob
     [-Network <ASRNetwork>]
     [-NetworkType <String>]
     -Direction <String>
     -ProtectionEntity <ASRProtectionEntity>
     [-WaitForCompletion]
     -VmNetworkId <String>
     [-Profile <AzureSMProfile>]
     [<CommonParameters>]

Beschreibung

Das Start-AzureSiteRecoveryTestFailoverJob-Cmdlet startet das TestfailoverJob-Failover einer Azure Site Recovery Protection-Entität oder eines Wiederherstellungsplans. Sie können überprüfen, ob der Auftrag erfolgreich war, indem Sie das Cmdlet Get-AzureRMSiteRecoveryJob verwenden.

Beispiele

Beispiel 1: Starten eines Testfailovers

PS C:\> $ProtectionContainer = Get-AzureSiteRecoveryProtectionContainer
PS C:\> $ProtectionEntity = Get-AzureSiteRecoveryProtectionEntity -ProtectionContainer $ProtectionContainer
PS C:\> Start-AzureSiteRecoveryTestFailoverJob -ProtectionEntity $ProtectionEntity -Direction "PrimaryToRecovery"
ID               : c38eecdc-731c-405b-a61c-08db99aae2fe
ClientRequestId  : 32ace403-0916-4967-83a1-529176bd6e88-2014-49-06 15:49:24Z-P
State            : NotStarted
StateDescription : NotStarted
StartTime        : 
EndTime          : 
AllowedActions   : {}
Name             : 
Tasks            : {}
Errors           : {}

Der erste Befehl verwendet das Cmdlet Get-AzureSiteRecoveryProtectionContainer zum Abrufen eines geschützten Containers und speichert ihn dann in der $ProtectionContainer Variablen.

Der zweite Befehl ruft die geschützten Entitäten ab, die zum geschützten Container gehören, der in $ProtectionContainer mithilfe des Cmdlets Get-AzureSiteRecoveryProtectionEntity gespeichert ist. Der Befehl speichert die Ergebnisse in der variablen $ProtectionEntity.

Der letzte Befehl startet den Testfailovervorgang für die in $ProtectionEntity gespeicherten geschützten Entitäten und gibt die Richtung des Failovers an.

Beispiel 2: Starten eines Testfailovers mithilfe eines Wiederherstellungsplans

PS C:\> $RecoveryPlan = Get-AzureSiteRecoveryRecoveryPlan -Name "RecoveryPlan01"
Start-AzureSiteRecoveryTestFailoverJob -Direction PrimaryToRecovery -RecoveryPlan $RecoveryPlan

Dieser Befehl ruft den Wiederherstellungsplan "RecoveryPlan01" für den aktuellen Azure Site Recovery Vault mithilfe des Cmdlets "Get-AzureSiteRecoveryRecoveryPlan " ab. Der Befehl speichert den Plan in der $RecoveryPlan Variablen.

Der zweite Befehl startet den Testfailovervorgang für den in $RecoveryPlan gespeicherten Wiederherstellungsplan und gibt die Richtung des Failovers an.

Parameter

-Direction

Gibt die Failoverrichtung an. Zulässige Werte für diesen Parameter:

  • PrimaryToRecovery
  • RecoveryToPrimary
Typ:String
Position:Named
Standardwert:None
Erforderlich:True
Pipelineeingabe akzeptieren:False
Platzhalterzeichen akzeptieren:False

-LogicalNetworkId

Gibt die ID des logischen Netzwerks an.

Typ:String
Position:Named
Standardwert:None
Erforderlich:True
Pipelineeingabe akzeptieren:False
Platzhalterzeichen akzeptieren:False

-Network

Gibt das Netzwerkobjekt an, das für das Testfailover verwendet werden soll. Verwenden Sie zum Abrufen eines Netzwerks das Cmdlet Get-AzureSiteRecoveryNetwork .

Typ:ASRNetwork
Position:Named
Standardwert:None
Erforderlich:True
Pipelineeingabe akzeptieren:False
Platzhalterzeichen akzeptieren:False

-NetworkType

Gibt den Netzwerktyp an, der für das Testfailover verwendet werden soll. Zulässige Werte für diesen Parameter:

  • Keine
  • Neue
  • Vorhanden
Typ:String
Position:Named
Standardwert:None
Erforderlich:False
Pipelineeingabe akzeptieren:False
Platzhalterzeichen akzeptieren:False

-Profile

Gibt das Azure-Profil an, aus dem dieses Cmdlet liest. Wenn Sie kein Profil angeben, liest dieses Cmdlet aus dem lokalen Standardprofil.

Typ:AzureSMProfile
Position:Named
Standardwert:None
Erforderlich:False
Pipelineeingabe akzeptieren:False
Platzhalterzeichen akzeptieren:False

-ProtectionContainerId

Gibt die ID eines geschützten Containers an. Dieses Cmdlet startet den Auftrag für einen geschützten virtuellen Computer, der zum Container gehört, den dieses Cmdlet angibt.

Typ:String
Position:Named
Standardwert:None
Erforderlich:True
Pipelineeingabe akzeptieren:False
Platzhalterzeichen akzeptieren:False

-ProtectionEntity

Gibt das Entitätsobjekt für den Site Recovery-Schutz an.

Typ:ASRProtectionEntity
Position:Named
Standardwert:None
Erforderlich:True
Pipelineeingabe akzeptieren:False
Platzhalterzeichen akzeptieren:False

-ProtectionEntityId

Gibt die ID eines geschützten virtuellen Computers an, für den der Auftrag gestartet werden soll.

Typ:String
Position:Named
Standardwert:None
Erforderlich:True
Pipelineeingabe akzeptieren:False
Platzhalterzeichen akzeptieren:False

-RecoveryPlan

Gibt einen Wiederherstellungsplan an, für den der Auftrag gestartet werden soll.

Typ:ASRRecoveryPlan
Position:Named
Standardwert:None
Erforderlich:True
Pipelineeingabe akzeptieren:False
Platzhalterzeichen akzeptieren:False

-RpId

Gibt die ID eines Wiederherstellungsplans an, für den der Auftrag gestartet werden soll.

Typ:String
Position:Named
Standardwert:None
Erforderlich:True
Pipelineeingabe akzeptieren:False
Platzhalterzeichen akzeptieren:False

-VmNetworkId

Gibt die ID des Netzwerks des virtuellen Computers an.

Typ:String
Position:Named
Standardwert:None
Erforderlich:True
Pipelineeingabe akzeptieren:False
Platzhalterzeichen akzeptieren:False

-WaitForCompletion

Gibt an, dass das Cmdlet auf den Abschluss des Vorgangs wartet, bevor es die Steuerung an die Windows PowerShell-Konsole zurückgibt.

Typ:SwitchParameter
Position:Named
Standardwert:None
Erforderlich:False
Pipelineeingabe akzeptieren:False
Platzhalterzeichen akzeptieren:False