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
ByRPObject (Default)
Get-AzureSiteRecoveryRecoveryPlanFile
-Path <String>
-RecoveryPlan <ASRRecoveryPlan>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
ById
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.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ById
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Path
Specifies the full path to store the recovery plan XML file.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | 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.
Parameter properties
Type: | AzureSMProfile |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-RecoveryPlan
Specifies an ASRRecoveryPlan object from which to get the recovery plan. To obtain an ASRRecoveryPlan object, use the Get-AzureSiteRecoveryRecoveryPlan cmdlet.
Parameter properties
Type: | ASRRecoveryPlan |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ByRPObject
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.