Remove-OBPolicy
Removes or pauses the currently set backup policy (OBPolicy object).
Syntax
Default (Default)
Remove-OBPolicy
[-Policy] <CBPolicy>
[-DeleteBackup]
[-EnablePruning]
[-Confirm]
[-WhatIf]
Description
The Remove-OBPolicy cmdlet removes or pauses the currently set backup policy (OBPolicy object). If the DeleteBackup parameter is specified, then any data backed up according to this policy on the Microsoft Azure Backup server is deleted and any existing schedule for backups is deleted as well. If the DeleteBackup parameter is not specified, the existing backups are are deleted and and the existing schedule for backups is paused. Use the EnablePruning parameter with DeleteBackup to retain backups as per the retention period in the backup policy.
This cmdlet supports the WhatIf and the Confirm parameters.
The cmdlet prompts the user for confirmation by default.
The WhatIf parameter gives a verbose description of what the cmdlet does without performing any operation.
The Confirm parameter specifies whether the cmdlet should prompt the user.
Specify -Confirm:$FALSE
to override the prompt.
To use Microsoft Azure Backup cmdlets, the user needs to be an administrator on the protected machine.
Examples
EXAMPLE 1
Get-OBPolicy | Remove-OBPolicy
This example deletes an existing policy.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: | SwitchParameter |
Default value: | False |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-DeleteBackup
Specifies that all data backed up on the Microsoft Azure Backup server associated with this policy should be deleted immediately.
Parameter properties
Type: | SwitchParameter |
Default value: | True |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 3 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-EnablePruning
Indicates that the backups stored aren't deleted immediately, but as per the configured policy. Also, specify the DeleteBackup parameter to enable this parameter. This flag requires MARS agent version 2.0.9250.0 to work.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Policy
Specifies the policy to be removed.
Parameter properties
Type: | CBPolicy |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 2 |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
Type: | SwitchParameter |
Default value: | False |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |