Get-AzRecoveryServicesBackupProtectionPolicy
Gets Backup protection policies for a vault.
Syntax
Get-AzRecoveryServicesBackupProtectionPolicy
[-VaultId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-PolicySubType <PSPolicyType>]
[<CommonParameters>]
Get-AzRecoveryServicesBackupProtectionPolicy
[-Name] <String>
[-VaultId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-PolicySubType <PSPolicyType>]
[<CommonParameters>]
Get-AzRecoveryServicesBackupProtectionPolicy
[-WorkloadType] <WorkloadType>
[-VaultId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-PolicySubType <PSPolicyType>]
[<CommonParameters>]
Get-AzRecoveryServicesBackupProtectionPolicy
[-WorkloadType] <WorkloadType>
[-BackupManagementType] <BackupManagementType>
[-VaultId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-PolicySubType <PSPolicyType>]
[<CommonParameters>]
Description
The Get-AzRecoveryServicesBackupProtectionPolicy cmdlet gets Azure Backup protection policies for a vault. Set the vault context by using the Set-AzRecoveryServicesVaultContext cmdlet before you use the current cmdlet.
Examples
Example 1: Get all policies in the vault
Get-AzRecoveryServicesBackupProtectionPolicy
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
$Pol= Get-AzRecoveryServicesBackupProtectionPolicy -Name "DefaultPolicy"
This command gets the protection policy named DefaultPolicy, and then stores it in the $pol variable.
Example 3: Get only Enhanced policies in a vault
$pol = Get-AzRecoveryServicesBackupProtectionPolicy -VaultId $vault.ID -BackupManagementType AzureVM -WorkloadType AzureVM -PolicySubType Enhanced
This command gets only the Enhanced protection policies in RS vault, and then stores it in the $pol variable.
Parameters
The class of resources being protected. Currently the values supported for this cmdlet are AzureVM, AzureStorage, AzureWorkload
| Type: | Nullable<T>[BackupManagementType] |
| Accepted values: | AzureVM, SCDPM, AzureBackupServer, AzureStorage, AzureWorkload, MAB |
| Position: | 3 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the name of the policy.
| Type: | String |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Type of policy to be fetched: Standard, Enhanced
| Type: | PSPolicyType |
| Accepted values: | Standard, Enhanced |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
ARM ID of the Recovery Services Vault.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Workload type of the resource. The current supported values are AzureVM, AzureFiles, MSSQL
| Type: | Nullable<T>[WorkloadType] |
| Accepted values: | AzureVM, AzureSQLDatabase, AzureFiles, MSSQL |
| Position: | 2 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Inputs
Outputs
Related Links
الملاحظات
إرسال الملاحظات وعرضها المتعلقة بـ