Remove-OBPolicy
Removes or pauses the currently set backup policy (OBPolicy object).
Syntax
Remove-OBPolicy
[-Policy] <CBPolicy>
[-DeleteBackup]
[-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 retained in accordance with the retention policy in effect when the backup was created, and the existing schedule for backups is paused.
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
Prompts you for confirmation before running the cmdlet.
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | False |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
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 |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the policy to be removed.
| Type: | CBPolicy |
| Position: | 2 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | False |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Inputs
None
Outputs
Microsoft.Internal.CloudBackup.Commands.OBPolicy