Set-PolicyObjective
Set-PolicyObjective
Sets the policy objective for a protection group.
Syntax
Set-PolicyObjective [-RetentionRange] <RetentionRange> [-LongTermBackupFrequency] <BackupFrequency> [-ProtectionGroup] <ProtectionGroup> [-PassThru <SwitchParameter>] [<CommonParameters>]
Set-PolicyObjective [-AlertThresholdInDays] <Int> [-ProtectionGroup] <ProtectionGroup> [-PassThru <SwitchParameter>] [<CommonParameters>]
Set-PolicyObjective [-GenerationList] <GenerationType> [-RetentionRangeList] <RetentionRange> [-FrequencyList] <Int32> [-ProtectionGroup] <ProtectionGroup> [-PassThru <SwitchParameter>] [<CommonParameters>]
Set-PolicyObjective [-CollocateDatasources] <Boolean> [-ProtectionGroup] <ProtectionGroup> [-PassThru <SwitchParameter>] [<CommonParameters>]
Set-PolicyObjective [-ShortTermBackupFrequency] <BackupFrequency> [-ProtectionGroup] <ProtectionGroup> -RetentionRangeInWeeks <Int32> [-CreateIncrementals] [-PassThru <SwitchParameter>] [<CommonParameters>]
Set-PolicyObjective [[-SynchronizationFrequency] <Int32>] [-RetentionRangeInDays] <Int32> [-ProtectionGroup] <ProtectionGroup> [-BeforeRecoveryPoint] [-PassThru <SwitchParameter>] [<CommonParameters>]
Set-PolicyObjective [-OnlineRetentionRange] <RetentionRange> [-ProtectionGroup] <ProtectionGroup> [-PassThru <SwitchParameter>] [<CommonParameters>]
Detailed Description
The Set-PolicyObjective cmdlet sets the policy objective for a protection group. You can set the policy to disk or tape. You can also specify the retention range for the protection group.
Default schedules are set automatically when you specify the protection objective using Set-PolicyObjective. To modify the default schedules use a Get-PolicySchedule followed by Set-PolicySchedule.
Parameters
-OnlineRetentionRange
Indicates for how much time the data will exist on DPM Online.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
1 |
-FrequencyList
The list of backup frequencies defined in the three protection objectives. Frequency list is an array of the following: Yearly=6; Half Yearly=5; Quarterly=4; Monthly=3; Biweekly=2; Weekly=1; Daily=0.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
2 |
-SynchronizationFrequency
The number of times synchronization should take place.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
2 |
-RetentionRangeList
The list of retention periods defined in the three protection objectives.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
1 |
-RetentionRangeInDays
The number of days for which a replica will be retained.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
1 |
-AlertThresholdInDays
The number of days after which an alert would be raised if the laptop has not been backed up.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
1 |
-GenerationList
The list of generations (father, grandfather and great grandfather) defined in the three protection objectives.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
3 |
-CollocateDatasources
Enables co-location when set to True, and disables co-location when set to False.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
1 |
-LongTermBackupFrequency
The backup frequency for long-term protection. The possible values are Daily, Weekly, BiWeekly, Monthly, Quarterly, HalfYearly, and Yearly.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
2 |
-ShortTermBackupFrequency
The backup frequency for short-term protection.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
2 |
-ProtectionGroup
The name of a protection group.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
true (ByValue) |
Position? |
0 |
-RetentionRange
Duration of time for which data will be retained on tape for long-term protection.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
1 |
-RetentionRangeInWeeks
The number of weeks for which a replica will be retained.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-BeforeRecoveryPoint
Indicates that synchronization should occur before the creation of recovery points.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-CreateIncrementals
Indicates whether incremental backups should be created.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-PassThru
The -PassThru parameter can be used with many commands in DPM to return a related object in cases where there is no default output. Using the PassThru parameter allows such cmdlets to be part of a pipeline.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-CommonParameter
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, and OutVariable. For more information, see about_CommonParameters.
Input and Return Types
The input type is the type of the objects that you can pipe to the cmdlet. The return type is the type of the objects that the cmdlet emits.
Notes
For more information, type "Get-Help Set-PolicyObjective -detailed".
For technical information, type "Get-Help Set-PolicyObjective -full".Additionally, any updated information about the cmdlet will be available at https://go.microsoft.com/fwlink/?LinkId=95130.
Examples
EXAMPLE 1
$pg = Get-ProtectionGroup -DPMServerName TestingServer
$mpg=Get-ModifiableProtectionGroup $pg[0]
Set-PolicyObjective $mpg -RetentionRangeInDays 10 -SynchronizationFrequency 360
This command sets the policy objective for the protection to a retention range of 10 days and synchronization frequency of 6 hours.
EXAMPLE 2
$rr= new-object -TypeName Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.RetentionRange -ArgumentList 1,"months"
$pg = Get-ProtectionGroup -DPMServerName TestingServer
$mpg=Get-ModifiableProtectionGroup $pg[0]
Set-PolicyObjective -RetentionRange 360 -LongTermBackupFrequency Weekly $mpg
This command sets the retention range for Testing Server to 360 days with a weekly backup frequency.
EXAMPLE 3
$pg = Get-ProtectionGroup -DPMServerName TestingServer
$mpg=Get-ModifiableProtectionGroup $pg[0]
Set-PolicyObjective -RetentionRangeInWeeks 12 -ShortTermBackupFrequency Daily $mpg
This command sets the retention range for Testing Server to 12 weeks with a daily backup frequency.