Skip to content

Latest commit

 

History

History
169 lines (128 loc) · 5.01 KB

Get-AzureRmRecoveryServicesBackupProtectionPolicy.md

File metadata and controls

169 lines (128 loc) · 5.01 KB
external help file Module Name ms.assetid online version schema
Microsoft.Azure.Commands.RecoveryServices.Backup.dll-Help.xml
AzureRM.RecoveryServices.Backup
2E202D0D-076D-431D-9338-9A84ABC0B461
2.0.0

Get-AzureRmRecoveryServicesBackupProtectionPolicy

SYNOPSIS

Gets Backup protection policies for a vault.

SYNTAX

NoParamSet (Default)

Get-AzureRmRecoveryServicesBackupProtectionPolicy [-VaultId <String>]
 [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

PolicyNameParamSet

Get-AzureRmRecoveryServicesBackupProtectionPolicy [-Name] <String> [-VaultId <String>]
 [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

WorkloadParamSet

Get-AzureRmRecoveryServicesBackupProtectionPolicy [-WorkloadType] <WorkloadType> [-VaultId <String>]
 [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

WorkloadBackupManagementTypeParamSet

Get-AzureRmRecoveryServicesBackupProtectionPolicy [-WorkloadType] <WorkloadType>
 [-BackupManagementType] <BackupManagementType> [-VaultId <String>] [-DefaultProfile <IAzureContextContainer>]
 [<CommonParameters>]

DESCRIPTION

The Get-AzureRmRecoveryServicesBackupProtectionPolicy cmdlet gets Azure Backup protection policies for a vault. Set the vault context by using the Set-AzureRmRecoveryServicesVaultContext cmdlet before you use the current cmdlet.

EXAMPLES

Example 1: Get all policies in the vault

PS C:\> Get-AzureRmRecoveryServicesBackupProtectionPolicy 
Name                 WorkloadType       BackupManagementType BackupTime                DaysOfWeek   
----                 ------------       -------------------- ----------                ----------   
DefaultPolicy        AzureVM            AzureVM              4/14/2016 5:00:00 PM                   
NewPolicy            AzureVM            AzureVM              4/23/2016 5:30:00 PM                   
NewPolicy2           AzureVM            AzureVM              4/24/2016 1:30:00 AM

This command gets all protection policies created in the vault.

Example 2: Get a specific policy

PS C:\> $Pol= Get-AzureRmRecoveryServicesBackupProtectionPolicy -Name "DefaultPolicy"

This command gets the protection policy named DefaultPolicy, and then stores it in the $Pol variable.

PARAMETERS

-BackupManagementType

Specifies the Backup management type. Currently, only AzureVM, AzureStorage is supported.

Type: System.Nullable`1[Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.BackupManagementType]
Parameter Sets: WorkloadBackupManagementTypeParamSet
Aliases:
Accepted values: AzureVM, MARS, SCDPM, AzureBackupServer, AzureSQL, AzureStorage

Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProfile

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

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Parameter Sets: (All)
Aliases: AzureRmContext, AzureCredential

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

-Name

Specifies the name of the policy.

Type: System.String
Parameter Sets: PolicyNameParamSet
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VaultId

ARM ID of the Recovery Services Vault.

Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WorkloadType

Specifies the workload type. Currently, only AzureVM, AzureFiles is supported.

Type: System.Nullable`1[Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.WorkloadType]
Parameter Sets: WorkloadParamSet, WorkloadBackupManagementTypeParamSet
Aliases:
Accepted values: AzureVM, AzureSQLDatabase, AzureFiles

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

System.String

Parameters: VaultId (ByValue)

OUTPUTS

Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.PolicyBase

NOTES

RELATED LINKS

New-AzureRmRecoveryServicesBackupProtectionPolicy

Remove-AzureRmRecoveryServicesBackupProtectionPolicy

Set-AzureRmRecoveryServicesBackupProtectionPolicy