Remove-OBPolicy

Removes or pauses the currently set backup policy (OBPolicy object).

语法

Default (默认值)

Remove-OBPolicy
    [-Policy] <CBPolicy>
    [-DeleteBackup]
    [-EnablePruning]
    [-Confirm]
    [-WhatIf]

说明

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.

示例

EXAMPLE 1

Get-OBPolicy | Remove-OBPolicy

This example deletes an existing policy.

参数

-Confirm

Prompts you for confirmation before running the cmdlet.

参数属性

类型:SwitchParameter
默认值:False
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-DeleteBackup

Specifies that all data backed up on the Microsoft Azure Backup server associated with this policy should be deleted immediately.

参数属性

类型:SwitchParameter
默认值:True
支持通配符:False
不显示:False

参数集

(All)
Position:3
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值: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.

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Policy

Specifies the policy to be removed.

参数属性

类型:CBPolicy
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:2
必需:True
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

参数属性

类型:SwitchParameter
默认值:False
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

输入

None

输出

Microsoft.Internal.CloudBackup.Commands.OBPolicy