New-​Azure​Rm​Recovery​Services​Asr​Recovery​Plan

Creates an ASR recovery plan.

Syntax

New-AzureRmRecoveryServicesAsrRecoveryPlan
   [-Azure]
   -FailoverDeploymentModel <String>
   -Name <String>
   -PrimaryFabric <ASRFabric>
   -ReplicationProtectedItem <ASRReplicationProtectedItem[]>
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]
New-AzureRmRecoveryServicesAsrRecoveryPlan
   -Name <String>
   -PrimaryFabric <ASRFabric>
   -RecoveryFabric <ASRFabric>
   -ReplicationProtectedItem <ASRReplicationProtectedItem[]>
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]
New-AzureRmRecoveryServicesAsrRecoveryPlan
   -Path <String>
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

The New-AzureRmRecoveryServicesAsrRecoveryPlan 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

PS C:\> $currentJob = New-AzureRmRecoveryServicesAsrRecoveryPlan -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.

Required Parameters

-Azure

Switch parameter to specify that the recovery location for recovery plan is Azure.

Type:SwitchParameter
Position:Named
Default value:None
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
Parameter Sets:Classic, ResourceManager
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Name of the recovery plan.

Type:String
Position:Named
Default value:None
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
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
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
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
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
-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.ASRReplicationProtectedItem[]

Outputs

System.Object