Get-AzureSiteRecoveryRecoveryPlanFile

Downloads an Azure Site Recovery plan in XML format.

Note

The cmdlets referenced in this documentation are for managing legacy Azure resources that use Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating new resources since ASM is scheduled for retirement. For more information, see Azure Service Manager retirement.

The Az PowerShell module is the recommended PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.

Syntax

Get-AzureSiteRecoveryRecoveryPlanFile
   -Path <String>
   -RecoveryPlan <ASRRecoveryPlan>
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]
Get-AzureSiteRecoveryRecoveryPlanFile
   -Path <String>
   -Id <String>
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]

Description

The Get-AzureSiteRecoveryRecoveryPlanFile cmdlet downloads an Azure Site Recovery plan in XML format. You can use this file to update the recovery plan and then upload it to the Site Recovery server.

A recovery plan gathers virtual machines in a group for the purposes of failover and recovery.

Examples

Example 1: Get a recovery plan file

PS C:\> $RecoveryPlan = Get-AzureSiteRecoveryRecoveryPlan 
PS C:\> Get-AzureSiteRecoveryRecoveryPlanFile -RecoveryPlan $RecoveryPlan -Path "C:\Users\Contoso\Desktop\RecoveryPlan.xml"

This command uses the Get-AzureSiteRecoveryRecoveryPlan cmdlet to get the recovery plan, and then stores it in the $RecoveryPlan variable.

The second command uses the GetAzureSiteRecoveryRecoveryPlanFile cmdlet to get the site recovery plan XML file in $RecoveryPlan. The command stores the XML file at the specified path.

Parameters

-Id

Specifies the ID of the recovery plan to get.

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

-Path

Specifies the full path to store the recovery plan XML file.

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

-Profile

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

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

-RecoveryPlan

Specifies an ASRRecoveryPlan object from which to get the recovery plan. To obtain an ASRRecoveryPlan object, use the Get-AzureSiteRecoveryRecoveryPlan cmdlet.

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