Set-OBRetentionPolicy

Set-OBRetentionPolicy

Sets the retention policy for the backup policy (OBPolicy object).

语法

Parameter Set: Default
Set-OBRetentionPolicy [-Policy] <CBPolicy> [-RetentionPolicy] <CBRetentionPolicy> [-Confirm] [-WhatIf] [ <CommonParameters>]

详细说明

The Set-OBRetentionPolicy cmdlet sets the retention policy for the backup policy (OBPolicy object). The allowed retention days for the OBRetentionPolicy object are 7, 15,or 30.

This cmdlet supports WhatIf and Confirm parameters with a medium impact. The medium impact signifies that the cmdlet will not prompt 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. Using –Confirm:$FALSE will override the prompt.

参数

-Policy<CBPolicy>

Specifies the policy related to backup.

别名

none

是否必需?

true

在哪里?

2

默认值

none

是否接受管道输入?

True (ByValue)

是否接受通配符?

false

-RetentionPolicy<CBRetentionPolicy>

Specifies the retention policy to be used for backup.

别名

none

是否必需?

true

在哪里?

3

默认值

none

是否接受管道输入?

True (ByValue)

是否接受通配符?

false

-Confirm

在运行 cmdlet 前提示你进行确认。

是否必需?

false

在哪里?

named

默认值

false

是否接受管道输入?

false

是否接受通配符?

false

-WhatIf

显示在 cmdlet 运行时将发生的情况。该 cmdlet 不运行。

是否必需?

false

在哪里?

named

默认值

false

是否接受管道输入?

false

是否接受通配符?

false

<CommonParameters>

此 cmdlet 支持常见的参数:-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer 和 -OutVariable。有关详细信息,请参阅 TechNet 上的 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

输入

输入类型是可以传送到 cmdlet 的对象的类型。

  • Microsoft.Internal.CloudBackup.Commands.OBRetentionPolicy

输出

输出类型是 cmdlet 发出的对象的类型。

  • Microsoft.Internal.CloudBackup.Commands.OBRetentionPolicy

示例

EXAMPLE 1

This example sets up and updates a new retention policy.

PS C:\> $newpo = New-OBPolicy
PS C:\> New-OBRetentionPolicy | Set-OBRetentionPolicy -Policy $newpo

相关主题

New-OBPolicy

New-OBRetentionPolicy