< Back
Remove-AzureRmBackupProtectionPolicy
Post
NAME Remove-AzureRmBackupProtectionPolicy
SYNOPSIS
Deletes a policy from a Backup vault.
SYNTAX
Remove-AzureRmBackupProtectionPolicy [-ProtectionPolicy] <AzureRMBackupProtectionPolicy> [-DefaultProfile <IAzureContextContainer>] [-Force]
[-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Remove-AzureRmBackupProtectionPolicy cmdlet deletes a policy from an Azure Backup vault.
Before you can delete a backup protection policy, the policy must not have any associated Backup items. Before you delete the policy, make sure
that each associated item is associated with some other policy. To associate another policy with a backup item, use the
Enable-AzureRmBackupProtection cmdlet.
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
-Force [<SwitchParameter>]
Forces the command to run without asking for user confirmation.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-ProtectionPolicy <AzureRMBackupProtectionPolicy>
Specifies protection policy that this cmdlet removes. To obtain an AzureRmBackupProtectionPolicy , use the Get-AzureRmBackupProtectionPolicy
cmdlet
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
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
AzureRMBackupProtectionPolicy
OUTPUTS
None
NOTES
Example 1: Remove a backup protection policy
PS C:\\>$Vault = Get-AzureRmBackupVault -Name "Vault03"
PS C:\\> Get-AzureRmBackupProtectionPolicy -Vault $Vault -Name "DailyBackup" | Remove-AzureRmBackupProtectionPolicy
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 creates a retention policy for 30 days of daily retention, and then stores it in the $Daily variable.
The second command gets the protection policy named DailyBackup in the vault in $Vault by using the Get-AzureRmBackupProtectionPolicy cmdlet. The
command passes the policy to the current cmdlet. That cmdlet removes the policy.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... tionpolicy
Enable-AzureRmBackupProtection
Get-AzureRmBackupProtectionPolicy
New-AzureRmBackupProtectionPolicy
SYNOPSIS
Deletes a policy from a Backup vault.
SYNTAX
Remove-AzureRmBackupProtectionPolicy [-ProtectionPolicy] <AzureRMBackupProtectionPolicy> [-DefaultProfile <IAzureContextContainer>] [-Force]
[-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Remove-AzureRmBackupProtectionPolicy cmdlet deletes a policy from an Azure Backup vault.
Before you can delete a backup protection policy, the policy must not have any associated Backup items. Before you delete the policy, make sure
that each associated item is associated with some other policy. To associate another policy with a backup item, use the
Enable-AzureRmBackupProtection cmdlet.
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
-Force [<SwitchParameter>]
Forces the command to run without asking for user confirmation.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-ProtectionPolicy <AzureRMBackupProtectionPolicy>
Specifies protection policy that this cmdlet removes. To obtain an AzureRmBackupProtectionPolicy , use the Get-AzureRmBackupProtectionPolicy
cmdlet
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
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
AzureRMBackupProtectionPolicy
OUTPUTS
None
NOTES
Example 1: Remove a backup protection policy
PS C:\\>$Vault = Get-AzureRmBackupVault -Name "Vault03"
PS C:\\> Get-AzureRmBackupProtectionPolicy -Vault $Vault -Name "DailyBackup" | Remove-AzureRmBackupProtectionPolicy
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 creates a retention policy for 30 days of daily retention, and then stores it in the $Daily variable.
The second command gets the protection policy named DailyBackup in the vault in $Vault by using the Get-AzureRmBackupProtectionPolicy cmdlet. The
command passes the policy to the current cmdlet. That cmdlet removes the policy.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... tionpolicy
Enable-AzureRmBackupProtection
Get-AzureRmBackupProtectionPolicy
New-AzureRmBackupProtectionPolicy