New-OBRetentionPolicy
New-OBRetentionPolicy
Creates a new OBRetentionPolicy specifying the number of days that the backup needs to be retained.
Syntax
Parameter Set: Default
New-OBRetentionPolicy [[-RetentionDays] <Int64> ] [[-RetentionWeeklyPolicy]] [[-WeekDaysOfWeek] <System.Collections.Generic.List`1[[System.DayOfWeek, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]> ] [[-WeekTimesOfDay] <System.Collections.Generic.List`1[[System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]> ] [[-RetentionWeeks] <System.Int64> ] [[-RetentionMonthlyPolicy]] [-MonthDaysOfMonth <System.Collections.Generic.List`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]> ] [-MonthDaysOfWeek <System.Collections.Generic.List`1[[System.DayOfWeek, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]> ] [-MonthTimesOfDay <System.Collections.Generic.List`1[[System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]> ] [-MonthWeeksOfMonth <System.Collections.Generic.List`1[[Microsoft.Internal.CloudBackup.ObjectModel.OMCommon.CBNthWeek, CBEngineServiceProxy, Version=1.0.523.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]> ] [-RetentionMonths <System.Int64> ] [-RetentionYearlyPolicy] [-RetentionYears <System.Int64> ] [-YearDaysOfMonth <System.Collections.Generic.List`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]> ] [-YearDaysOfWeek <System.Collections.Generic.List`1[[System.DayOfWeek, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]> ] [-YearMonthsOfYear <System.Collections.Generic.List`1[[Microsoft.Internal.CloudBackup.ObjectModel.OMCommon.CBMonth, CBEngineServiceProxy, Version=1.0.523.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]> ] [-YearTimesOfDay <System.Collections.Generic.List`1[[System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]> ] [-YearWeeksOfMonth <System.Collections.Generic.List`1[[Microsoft.Internal.CloudBackup.ObjectModel.OMCommon.CBNthWeek, CBEngineServiceProxy, Version=1.0.523.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]> ] [ <CommonParameters>]
Detailed Description
The New-OBRetentionPolicy creates a new OBRetentionPolicy object specifying the number of days to retain the backed up items.
Parameters
-MonthDaysOfMonth<System.Collections.Generic.List`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]>
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-MonthDaysOfWeek<System.Collections.Generic.List`1[[System.DayOfWeek, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]>
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-MonthTimesOfDay<System.Collections.Generic.List`1[[System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]>
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-MonthWeeksOfMonth<System.Collections.Generic.List`1[[Microsoft.Internal.CloudBackup.ObjectModel.OMCommon.CBNthWeek, CBEngineServiceProxy, Version=1.0.523.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]>
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-RetentionDays<Int64>
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.
Aliases |
none |
Required? |
false |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-RetentionMonthlyPolicy
Aliases |
none |
Required? |
false |
Position? |
7 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-RetentionMonths<System.Int64>
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-RetentionWeeklyPolicy
Aliases |
none |
Required? |
false |
Position? |
3 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-RetentionWeeks<System.Int64>
Aliases |
none |
Required? |
false |
Position? |
6 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-RetentionYearlyPolicy
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-RetentionYears<System.Int64>
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WeekDaysOfWeek<System.Collections.Generic.List`1[[System.DayOfWeek, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]>
Aliases |
none |
Required? |
false |
Position? |
4 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WeekTimesOfDay<System.Collections.Generic.List`1[[System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]>
Aliases |
none |
Required? |
false |
Position? |
5 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-YearDaysOfMonth<System.Collections.Generic.List`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]>
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-YearDaysOfWeek<System.Collections.Generic.List`1[[System.DayOfWeek, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]>
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-YearMonthsOfYear<System.Collections.Generic.List`1[[Microsoft.Internal.CloudBackup.ObjectModel.OMCommon.CBMonth, CBEngineServiceProxy, Version=1.0.523.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]>
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-YearTimesOfDay<System.Collections.Generic.List`1[[System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]>
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-YearWeeksOfMonth<System.Collections.Generic.List`1[[Microsoft.Internal.CloudBackup.ObjectModel.OMCommon.CBNthWeek, CBEngineServiceProxy, Version=1.0.523.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]>
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
- None
Outputs
The output type is the type of the objects that the cmdlet emits.
Microsoft.Internal.CloudBackup.Commands.OBRetentionPolicy
Specifies the number of days that the backup needs to be retained.
Examples
EXAMPLE 1
This example creates a new retention policy.
PS C:\> New-OBRetentionPolicy -RetentionDays 30