Remove-OBPolicy
Removes or pauses the currently set backup policy (OBPolicy object).
Syntax
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.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DeleteBackup
Specifies that all data backed up on the Microsoft Azure Backup server associated with this policy should be deleted immediately.
Type: | SwitchParameter |
Position: | 3 |
Default value: | True |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | 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.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Policy
Specifies the policy to be removed.
Type: | CBPolicy |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None
Outputs
Microsoft.Internal.CloudBackup.Commands.OBPolicy