< Back

Get-AzureRmBackupProtectionPolicy

Tue Jan 29, 2019 9:34 pm

NAME Get-AzureRmBackupProtectionPolicy



SYNOPSIS

Gets backup policies for a Backup vault.





SYNTAX

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





DESCRIPTION

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





PARAMETERS

-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Name <String>

Specifies the name of the policy that this cmdlet gets.



Required? false

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Vault <AzureRMBackupVault>

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



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

AzureRmBackupVault







OUTPUTS

AzureRmBackupProtectionPolicy







NOTES





* None



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.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... tionpolicy

Get-AzureRmBackupVault

Enable-AzureRmBackupProtection

New-AzureRmBackupProtectionPolicy

Remove-AzureRmBackupProtectionPolicy