Bewerken

Delen via


New-AzRecoveryServicesAsrRecoveryPlan

Creates an ASR recovery plan.

Syntax

New-AzRecoveryServicesAsrRecoveryPlan
   -Name <String>
   -PrimaryFabric <ASRFabric>
   -RecoveryFabric <ASRFabric>
   -ReplicationProtectedItem <ASRReplicationProtectedItem[]>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzRecoveryServicesAsrRecoveryPlan
   -Name <String>
   -PrimaryFabric <ASRFabric>
   [-Azure]
   -FailoverDeploymentModel <String>
   -ReplicationProtectedItem <ASRReplicationProtectedItem[]>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzRecoveryServicesAsrRecoveryPlan
   -Name <String>
   -PrimaryFabric <ASRFabric>
   [-PrimaryZone <String>]
   [-RecoveryZone <String>]
   [-PrimaryEdgeZone <String>]
   [-RecoveryEdgeZone <String>]
   [-AzureZoneToZone]
   -ReplicationProtectedItem <ASRReplicationProtectedItem[]>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzRecoveryServicesAsrRecoveryPlan
   -Name <String>
   -PrimaryFabric <ASRFabric>
   -PrimaryEdgeZone <String>
   [-EdgeZoneToAzure]
   -ReplicationProtectedItem <ASRReplicationProtectedItem[]>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzRecoveryServicesAsrRecoveryPlan
   -Name <String>
   -PrimaryFabric <ASRFabric>
   -RecoveryEdgeZone <String>
   [-AzureToEdgeZone]
   -ReplicationProtectedItem <ASRReplicationProtectedItem[]>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzRecoveryServicesAsrRecoveryPlan
   -Name <String>
   -PrimaryFabric <ASRFabric>
   -PrimaryEdgeZone <String>
   -RecoveryEdgeZone <String>
   [-EdgeZoneToEdgeZone]
   -ReplicationProtectedItem <ASRReplicationProtectedItem[]>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzRecoveryServicesAsrRecoveryPlan
   -Path <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-AzRecoveryServicesAsrRecoveryPlan cmdlet creates an Azure Site Recovery, recovery plan in the Recovery Services vault.

A recovery plan gathers virtual machines belonging to an application into a unit to allow them to be recovered together.

Examples

Example 1

$currentJob = New-AzRecoveryServicesAsrRecoveryPlan -Name $RPName -PrimaryFabric $PrimaryFabric -RecoveryFabric $RecoveryFabric -ReplicationProtectedItem $RPI

Starts the recovery plan creation operation with the specified parameters and returns the ASR job used to track the operation.

Example 2

$currentJob = New-AzRecoveryServicesAsrRecoveryPlan -Name $RPName -PrimaryFabric $PrimaryFabric -PrimaryZone $pZone -RecoveryZone $rZone -ReplicationProtectedItem $RPI

Starts the recovery plan creation operation for Azure zone to zone replicated items and returns the ASR job used to track the operation.

Example 3

$currentJob = New-AzRecoveryServicesAsrRecoveryPlan -Name $RPName -PrimaryFabric $PrimaryFabric -PrimaryEdgeZone $pEdgeZone -RecoveryZone $rZone -ReplicationProtectedItem $RPI

Starts the recovery plan creation operation for Azure EdgeZone to Availability Zone replicated items and returns the ASR job used to track the operation.

Parameters

-Azure

Switch parameter specifies the scenario for azure to azure disaster recovery, recovery plan creation.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-AzureToEdgeZone

Switch parameter specifies creating the replicated item in Azure to EdgeZone scenario.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-AzureZoneToZone

Switch parameter specifies creating the replicated item in azure zone to zone scenario.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-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

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EdgeZoneToAzure

Switch parameter specifies creating the replicated item in EdgeZone to Azure scenario.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-EdgeZoneToEdgeZone

Switch parameter specifies creating the replicated item EdgeZone to EdgeZone scenario.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-FailoverDeploymentModel

Specifies the failover deployment model (Classic or Resource Manager) of the replication protected items that will be part of this recovery plan.

Type:String
Accepted values:Classic, ResourceManager
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Name

Name of the recovery plan.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Path

Specifies the path to the recovery plan definition json file. A recovery plan definition json can be used to create the recovery plan.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PrimaryEdgeZone

Specifies the primary edge zone of the replication protected items that will be part of this recovery plan.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PrimaryFabric

Specifies the ASR fabric object for the primary ASR fabric of the replication protected items that will be part of this recovery plan.

Type:ASRFabric
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PrimaryZone

Specifies the primary Availabilty zone of the replication protected items that will be part of this recovery plan.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RecoveryEdgeZone

Specifies the recovery edge zone of the replication protected items that will be part of this recovery plan.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-RecoveryFabric

Specifies the ASR fabric object for the recovery ASR fabric of the replication protected items that will be part of this recovery plan.

Type:ASRFabric
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-RecoveryZone

Specifies the primary Availabilty zone of the replication protected items that will be part of this recovery plan.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ReplicationProtectedItem

The list of replication protected items to add to the first group of the recovery plan.

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

ASRReplicationProtectedItem[]

Outputs

ASRJob