Set-OBRetentionPolicy

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

Syntax

Set-OBRetentionPolicy
   [-Policy] <CBPolicy>
   [-RetentionPolicy] <CBRetentionPolicy>
   [-Confirm]
   [-WhatIf]

Description

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.

ps_mob_user_group_remark

Examples

EXAMPLE 1

PS C:\>$newpo = New-OBPolicy



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

This example sets up and updates a new retention policy.

Required Parameters

-Policy

Specifies the policy related to backup.

Type:CBPolicy
Position:2
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-RetentionPolicy

Specifies the retention policy to be used for backup.

Type:CBRetentionPolicy
Position:3
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Position:Named
Default value:False
Accept pipeline input:False
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
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.Internal.CloudBackup.Commands.OBRetentionPolicy

Outputs

Microsoft.Internal.CloudBackup.Commands.OBRetentionPolicy