New-AzureRmRecoveryServicesAsrRecoveryPlan
Creates an ASR recovery plan.
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
New-AzureRmRecoveryServicesAsrRecoveryPlan
-Name <String>
-PrimaryFabric <ASRFabric>
-RecoveryFabric <ASRFabric>
-ReplicationProtectedItem <ASRReplicationProtectedItem[]>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzureRmRecoveryServicesAsrRecoveryPlan
-Name <String>
-PrimaryFabric <ASRFabric>
[-Azure]
-FailoverDeploymentModel <String>
-ReplicationProtectedItem <ASRReplicationProtectedItem[]>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzureRmRecoveryServicesAsrRecoveryPlan
-Path <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<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.
Parameters
-Azure
Switch parameter to specify that the recovery location for recovery plan is Azure.
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: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
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 |
-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 |
-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 |
-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 |