New-OBRetentionPolicy
Creates a new OBRetentionPolicy specifying the number of days that the backup needs to be retained.
New-OBRetentionPolicy
[[-RetentionDays] <Long {7 | 15 | 30}>]
[[-RetentionWeeklyPolicy]]
[[-WeekDaysOfWeek] {Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday}]
[[-WeekTimesOfDay] <List[timespan]>]
[[-RetentionWeeks] <long>]
[[-RetentionMonthlyPolicy]]
[<CommonParameters>]
The New-OBRetentionPolicy creates a new OBRetentionPolicy object specifying the number of days to retain the backed up items.
To use Microsoft Azure Backup cmdlets, the user needs to be an administrator on the protected machine.
New-OBRetentionPolicy -RetentionDays 30
This example creates a new retention policy.
Specifies the number of days to retain the backup data.
Retention days must be specified as either 7
, 15
, or 30
.
Other integers are not supported.
Type: | Long {7 | 15 | 30} |
Position: | 2 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
None
Microsoft.Internal.CloudBackup.Commands.OBRetentionPolicy
Specifies the number of days that the backup needs to be retained.