Condividi tramite


Get-DPMPolicyObjective

Get-DPMPolicyObjective

Gets the protection policy for a protection group.

Syntax

Parameter Set: LongTerm
Get-DPMPolicyObjective [-ProtectionGroup] <ProtectionGroup> -LongTerm <DbEnums+LongTermLocation> {Online | Tape} [ <CommonParameters>]

Parameter Set: ShortTerm
Get-DPMPolicyObjective [-ProtectionGroup] <ProtectionGroup> -ShortTerm [ <CommonParameters>]

Detailed Description

The Get-DPMPolicyObjective cmdlet gets the protection policy for a protection group. A protection policy is the retention range and frequency of synchronization to disk or backup to tape.

Parameters

-LongTerm<DbEnums+LongTermLocation>

Specifies the type of long-term protection policy that this cmdlet gets. Valid values are:

-- Tape
-- Online
-- OnlineAndTape

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ProtectionGroup<ProtectionGroup>

Specifies a protection group for which this cmdlet gets a policy. 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

-ShortTerm

Indicates that this cmdlet gets the short-term protection policy.

Aliases

none

Required?

true

Position?

named

Default Value

none

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.

  • PolicyObjective

Examples

Example 1: Get a short-term policy objective for a protection group

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

The second command gets the short-term policy objective from the protection group in $PGroup.

PS C:\> $PGroup = Get-DPMProtectionGroup -DPMServerName "DPMServer02"
PS C:\> Get-DPMPolicyObjective -ProtectionGroup $PGroup -ShortTerm

Example 2: Get a long-term policy objective for a protection group

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

The second command gets the long-term policy objective from the protection group in $PGroup.

PS C:\> $PGroup = Get-DPMProtectionGroup -DPMServerName "DPMServer02"
PS C:\> Get-DPMPolicyObjective -ProtectionGroup $PGroup -LongTerm

Get-DPMProtectionGroup

Set-DPMPolicyObjective