Поделиться через


Set-DPMProtectionType

Set-DPMProtectionType

Sets the protection type for a protection group.

Syntax

Parameter Set: Default
Set-DPMProtectionType [-ProtectionGroup] <ProtectionGroup> [-LongTerm <DbEnums+LongTermProtection]> ] [-PassThru] [-ShortTerm <DbEnums+DataLocation]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Set-DPMProtectionType cmdlet sets the protection type for a protection group.

You can use the ShortTerm and LongTerm parameters individually or in combination to define protection types.

You can set the following combinations of parameter values for a protection type:

-- Disk to disk. -ShortTerm Disk
-- Disk to tape. -ShortTerm Tape
-- Disk to tape, long-term. -LongTerm Tape
-- Disk to disk to tape. -ShortTerm Disk -LongTerm Tape
-- Disk to tape to tape. -ShortTerm Tape -LongTerm Tape

Parameters

-LongTerm<DbEnums+LongTermProtection]>

Specifies that the protection group is set to long-term tape protection. Valid values are:

-- Tape
-- Online
-- OnlineAndTape

Aliases

none

Required?

false

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.

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 protection type. 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<DbEnums+DataLocation]>

Specifies that the protection group is on disk, on tape, or on neither, if you do not specify a value. Valid values are: Disk and Tape.

Aliases

none

Required?

false

Position?

named

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.

Examples

Example 1: Set the protection type to short term on disk

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

The second command sets the protection type for the protection group in $PGroup to short-term on disk.

PS C:\> $PGroup = New-DPMProtectionGroup -DPMServerName "DPMServer02"
PS C:\> Set-DPMProtectionType -ProtectionGroup $PGroup -ShortTerm Disk

Example 2: Set the protection type to disk to disk to tape

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

The second command sets the protection type for the protection group in $PGroup to disk to disk to tape.

PS C:\> $PGroup = New- DPMProtectionGroup -DPMServerName "DPMServer02"
PS C:\> Set-DPMProtectionType -ProtectionGroup $PGroup -ShortTerm Disk -LongTerm Tape

New-DPMProtectionGroup

Set-DPMProtectionGroup