Set-DPMPolicyObjective

Sets the policy objective for a protection group.

Syntax

Set-DPMPolicyObjective
   [-RetentionRangeDays] <Int32>
   [-ProtectionGroup] <ProtectionGroup>
   [[-SynchronizationFrequencyMinutes] <Int32>]
   [-BeforeRecoveryPoint]
   [-PassThru]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-DPMPolicyObjective
   [-RetentionRangeInWeeks] <Int32>
   [-ShortTermBackupFrequency] <BackupFrequency>
   [-ProtectionGroup] <ProtectionGroup>
   [-CreateIncrementals]
   [-PassThru]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-DPMPolicyObjective
   [-LongTermBackupFrequency] <BackupFrequency>
   [-ProtectionGroup] <ProtectionGroup>
   [-RetentionRange] <RetentionRange>
   [-PassThru]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-DPMPolicyObjective
   [-ProtectionGroup] <ProtectionGroup>
   [-RetentionRangeList] <RetentionRange[]>
   [-FrequencyList] <Int32[]>
   [-GenerationList] <GenerationType[]>
   [-PassThru]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-DPMPolicyObjective
   [-ProtectionGroup] <ProtectionGroup>
   [-OnlineRetentionRange] <Int32>
   [-PassThru]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-DPMPolicyObjective
   [-ProtectionGroup] <ProtectionGroup>
   [-OnlineRetentionRangeList] <RetentionRange[]>
   [-PassThru]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-DPMPolicyObjective
   [-ProtectionGroup] <ProtectionGroup>
   [-ColocateDatasources] <Boolean>
   [-PassThru]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-DPMPolicyObjective
   [-ProtectionGroup] <ProtectionGroup>
   [-AlertThresholdInDays] <Int32>
   [-PassThru]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-DPMPolicyObjective cmdlet sets the policy objective for a System Center 2016 - Data Protection Manager (DPM) protection group. You can set the policy to back up to disk or tape and specify a retention range for the protection group.

If you specify the protection objective by using the Set-DPMPolicyObjective cmdlet, DPM sets default schedules automatically. To change the default schedules, use the Get-DPMPolicySchedule cmdlet followed by the Set-DPMPolicySchedule cmdlet.

Examples

Example 1: Set the policy objective for a protection group

PS C:\>$PGroup = Get-ProtectionGroup -DPMServerName "DPMServer02"
PS C:\> $MPGroup = Get-ModifiableProtectionGroup $PGroup[0]
PS C:\> Set-DPMPolicyObjective -ProtectionGroup $MPGroup -RetentionRangeInDays 10 -SynchronizationFrequency 360

The first command gets the protection group objects from the DPM server named DPMServer02, and then stores them in the $PGroup variable.

The second command uses standard array notation to specify the second member of the $PGroup array in editable format, and stores the protection group in the $MPGroup variable.

The third command sets the policy objective for the protection group in $MPGroup to a retention range of 10 days and synchronization frequency of 6 hours, which is 360 minutes.

Example 2: Set the retention range for a DPM server

PS C:\>$Rr = New-Object -TypeName Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.RetentionRange -ArgumentList 1,"months"
PS C:\> $PGroup = Get-ProtectionGroup -DPMServerName "DPMServer02"
PS C:\> $MPGroup = Get-ModifiableProtectionGroup $PGroup[0]
PS C:\> Set-DPMPolicyObjective -ProtectionGroup $MPGroup -RetentionRange 360 -LongTermBackupFrequency Weekly

The first command creates a RetentionRange object, and then stores it in the $Rr variable.

The second command gets protection groups from the DPM server named DPMServer02, and then stores them in the $PGroup variable.

The third command uses standard array notation to specify the first member of the $PGroup array in editable form, and stores the editable protection group in the $MPGroup variable.

The fourth command sets the retention range for the protection group to 360 days and the long-term backup frequency to weekly.

Example 3: Set a retention range

PS C:\>$PGroup = Get-ProtectionGroup -DPMServerName "DPMServer02"
PS C:\> $MPGroup = Get-ModifiableProtectionGroup $PGroup[0]
PS C:\> Set-DPMPolicyObjective -RetentionRangeInWeeks 12 -ShortTermBackupFrequency Daily -ProtectionGroup $MPGroup

This example shows another way to set a retention range for a DPM server.

The first command gets protection groups from the DPM server named DPMServer02, and then stores them in the $PGroup variable.

The second command uses standard array notation to specify the first member of the $PGroup array in editable form, and stores the editable protection group in the $MPGroup variable.

The third command sets the retention range for the protection group to 12 weeks and the short-term backup frequency to daily.

Example 4: Set the retention ranges for online protection

PS C:\>$RRList = @()
PS C:\> $RRList += (New-Object -TypeName Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.RetentionRange -ArgumentList 180, Days)
PS C:\> $RRList += (New-Object -TypeName Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.RetentionRange -ArgumentList 104, Weeks)
PS C:\> $RRList += (New-Object -TypeName Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.RetentionRange -ArgumentList 60, Month)
PS C:\> $RRList += (New-Object -TypeName Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.RetentionRange -ArgumentList 10, Years)
PS C:\> $PGroup = Get-ProtectionGroup -DPMServerName "DPMServer02"
PS C:\> $MPGroup = Get-ModifiableProtectionGroup -ProtectionGroup $PGroup[0]
PS C:\> Set-DPMPolicyObjective -ProtectionGroup $MPGroup -OnlineRetentionRangeList $RRList

The first command creates a RetentionRange object array stored in the $RRlist variable.

The second, third, fourth, and fifth commands create RetentionRange objects, and add them to $RRlist.

The sixth command gets protection groups from the DPM server named DPMServer02, and then stores them in the $PGroup variable.

The seventh command uses standard array notation to specify the first member of the $PGroup array in editable form, and stores the editable protection group in the $MPGroup variable.

The final command sets the online retention ranges for the protection group and the long-term online backup frequency to daily.

Required Parameters

-AlertThresholdInDays

Specifies the number of days after the most recent backup that DPM waits before it raises an alert.

Type:Int32
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ColocateDatasources

Indicates whether DPM enables colocation.

Type:Boolean
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-FrequencyList

Specifies an array of backup frequencies that the three protection objectives define.

The acceptable values for this parameter are:

  • 6. Yearly
  • 5. Half yearly
  • 4. Quarterly
  • 3. Monthly
  • 2. Biweekly
  • 1. Weekly
  • 0. Daily
Type:Int32[]
Position:3
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-GenerationList

Specifies an array of generations that the three protection objectives define.

The acceptable values for this parameter are:

  • GreatGrandfather
  • Grandfather
  • Father
  • Son
Type:GenerationType[]
Position:4
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-LongTermBackupFrequency

Specifies the backup frequency for long-term protection.

The acceptable values for this parameter are:

  • Daily
  • Weekly
  • BiWeekly
  • Monthly
  • Quarterly
  • HalfYearly
  • Yearly
Type:BackupFrequency
Parameter Sets:Daily, Weekly, BiWeekly, Monthly, Quarterly, HalfYearly, Yearly
Position:3
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OnlineRetentionRange

Specifies the retention range for online protection.

Type:Int32
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OnlineRetentionRangeList

Specifies an array of retention periods that define the retention ranges for online protection.

Type:RetentionRange[]
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ProtectionGroup

Specifies a protection group for which this cmdlet sets a policy objective. To obtain a ProtectionGroup object, use the Get-DPMProtectionGroup cmdlet.

Type:ProtectionGroup
Position:1
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-RetentionRange

Specifies the duration for which DPM keeps data on tape for long-term protection.

Type:RetentionRange
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RetentionRangeDays

Specifies the number of days for which DPM keeps a replica.

Type:Int32
Aliases:RetentionRangeInDays
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RetentionRangeInWeeks

Specifies the number of weeks for which DPM keeps a replica.

Type:Int32
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RetentionRangeList

Specifies an array of retention periods that the three protection objectives define.

Type:RetentionRange[]
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ShortTermBackupFrequency

Specifies the backup frequency for short-term protection.

The acceptable values for this parameter are:

  • Daily
  • Weekly
  • BiWeekly
  • Monthly
  • Quarterly
  • HalfYearly
  • Yearly
Type:BackupFrequency
Parameter Sets:Daily, Weekly, BiWeekly, Monthly, Quarterly, HalfYearly, Yearly
Position:3
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-BeforeRecoveryPoint

Indicates that DPM runs synchronization before it creates recovery points.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-CreateIncrementals

Indicates that DPM creates incremental backups.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SynchronizationFrequencyMinutes

Specifies the frequency of synchronization, in minutes.

Type:Int32
Aliases:SynchronizationFrequency
Parameter Sets:15, 30, 45, 60, 120, 240, 360, 720, 1440
Position:3
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Schedule