Get-​Azure​Rm​Backup​Protection​Policy

Gets backup policies for a Backup vault.

Syntax

Get-AzureRmBackupProtectionPolicy
   [-Vault] <AzureRMBackupVault>
   [[-Name] <String>]
   [<CommonParameters>]

Description

The Get-AzureRmBackupProtectionPolicy cmdlet gets backup policies for an Azure Backup vault.

Examples

Example 1: View the policies in a vault

PS C:\>$Vault = Get-AzureRmBackupVault -Name "Vault03"
PS C:\> Get-AzureRmBackupProtectionPolicy -Vault $Vault 
Name                      Type               ScheduleType       BackupTime
----                      ----               ------------       ----------
contoso01                 AzureVM            Daily              26-Aug-15 3:00:00 PM
DailyBkp                  AzureVM            Daily              26-Aug-15 3:00:00 PM
DefaultPolicy             AzureVM            Daily              26-Aug-15 12:30:00 AM
WeeklyBkp                 AzureVM            Weekly             26-Aug-15 5:00:00 PM
contoso02                 AzureVM            Daily              26-Aug-15 3:00:00 PM

The first command gets the vault named Vault03 by using the Get-AzureRmBackupVault cmdlet. The command stores that object in the $Vault variable.

The second command gets all the Backup protection policies for the vault in $Vault.

Example 2: Get a specific policy from a vault

PS C:\>$Vault = Get-AzureRmBackupVault -Name "Vault03"
PS C:\> Get-AzureRmBackupProtectionPolicy -Vault $Vault -Name "DefaultPolicy"
Name                      Type               ScheduleType       BackupTime
----                      ----               ------------       ----------
DefaultPolicy             AzureVM            Daily              26-Aug-15 12:30:00 AM

The first command gets the vault named Vault03 by using the Get-AzureRmBackupVault cmdlet. The command stores that object in the $Vault variable.

The second command gets the Backup protection policy named DefaultPolicy for the vault in $Vault.

Required Parameters

-Vault

Specifies the Backup vault for which this cmdlet gets policies. To obtain an AzureRmBackupVault object, use the Get-AzureRmBackupVault cmdlet.

Type:AzureRMBackupVault
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Optional Parameters

-Name

Specifies the name of the policy that this cmdlet gets.

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

Inputs

AzureRmBackupVault

Outputs

AzureRmBackupProtectionPolicy

Notes

  • None