Set-DPMPolicyObjective

Set-DPMPolicyObjective

Sets the policy objective for a protection group.

Syntax

Parameter Set: ShortTermDisk
Set-DPMPolicyObjective [-ProtectionGroup] <ProtectionGroup> [-RetentionRangeDays] <Int32> [[-SynchronizationFrequencyMinutes] <Int32> {15 | 30 | 45 | 60 | 120 | 240 | 360 | 720 | 1440} ] [-BeforeRecoveryPoint] [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: AlertThresholdInDays
Set-DPMPolicyObjective [-ProtectionGroup] <ProtectionGroup> [-AlertThresholdInDays] <Int32> [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ColocateDatasources
Set-DPMPolicyObjective [-ProtectionGroup] <ProtectionGroup> [-ColocateDatasources] <Boolean> [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: LongTermCloud
Set-DPMPolicyObjective [-ProtectionGroup] <ProtectionGroup> [-OnlineRetentionRange] <Int32> [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: LongTermCloudGFS
Set-DPMPolicyObjective [-ProtectionGroup] <ProtectionGroup> [-OnlineRetentionRangeList] <RetentionRange[]> [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: LongTermTape
Set-DPMPolicyObjective [-ProtectionGroup] <ProtectionGroup> [-RetentionRange] <RetentionRange> [-LongTermBackupFrequency] <BackupFrequency> {Daily | Weekly | BiWeekly | Monthly | Quarterly | HalfYearly | Yearly} [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: LongTermTapeCustom
Set-DPMPolicyObjective [-ProtectionGroup] <ProtectionGroup> [-RetentionRangeList] <RetentionRange[]> [-FrequencyList] <Int32[]> [-GenerationList] <GenerationType[]> [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ShortTermTape
Set-DPMPolicyObjective [-ProtectionGroup] <ProtectionGroup> [-RetentionRangeInWeeks] <Int32> [-ShortTermBackupFrequency] <BackupFrequency> {Daily | Weekly | BiWeekly | Monthly | Quarterly | HalfYearly | Yearly} [-CreateIncrementals] [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Set-DPMPolicyObjective cmdlet sets the policy objective for a System Center 2012 – 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-PolicySchedule cmdlet followed by the Set-DPMPolicySchedule cmdlet.

Parameters

-AlertThresholdInDays<Int32>

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

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-BeforeRecoveryPoint

Indicates that DPM runs synchronization before it creates recovery points.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ColocateDatasources<Boolean>

Indicates whether DPM enables colocation.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CreateIncrementals

Indicates that DPM creates incremental backups.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-FrequencyList<Int32[]>

Specifies an array of backup frequencies that the three protection objectives define. The frequency list can contain any combination of the following values:

-- 6. Yearly
-- 5. Half yearly
-- 4. Quarterly
-- 3. Monthly
-- 2. Biweekly
-- 1. Weekly
-- 0. Daily

Aliases

none

Required?

true

Position?

3

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-GenerationList<GenerationType[]>

Specifies an array of generations that the three protection objectives define. The generation list can include any combination of the following values:

-- GreatGrandfather
-- Grandfather
-- Father
-- Son

Aliases

none

Required?

true

Position?

4

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-LongTermBackupFrequency<BackupFrequency>

Specifies the backup frequency for long-term protection. Valid values are:

-- Daily
-- Weekly
-- BiWeekly
-- Monthly
-- Quarterly
-- HalfYearly
-- Yearly

Aliases

none

Required?

true

Position?

3

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-OnlineRetentionRange<Int32>

Specifies the retention range for online protection.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-OnlineRetentionRangeList<RetentionRange[]>

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

Aliases

none

Required?

true

Position?

2

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ProtectionGroup<ProtectionGroup>

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

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-RetentionRange<RetentionRange>

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

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RetentionRangeDays<Int32>

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

Aliases

RetentionRangeInDays

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RetentionRangeInWeeks<Int32>

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

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RetentionRangeList<RetentionRange[]>

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

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ShortTermBackupFrequency<BackupFrequency>

Specifies the backup frequency for short-term protection. Valid values are:

-- Daily
-- Weekly
-- BiWeekly
-- Monthly
-- Quarterly
-- HalfYearly
-- Yearly

Aliases

none

Required?

true

Position?

3

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SynchronizationFrequencyMinutes<Int32>

Specifies the frequency of synchronization, in minutes.

Aliases

SynchronizationFrequency

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

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.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Schedule

Examples

Example 1: Set the policy objective for a protection group

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.

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

Example 2: Set the retention range for a DPM server

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.

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 

Example 3: Set a retention range

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.

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

Example 4: Set the retention ranges for online protection

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.

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

Get-DPMPolicyObjective

Get-DPMPolicySchedule

Set-DPMPolicySchedule