Set-DPMProtectionType

Sets the protection type for a protection group.

Syntax

Set-DPMProtectionType [-ProtectionGroup] <ProtectionGroup> [-LongTerm <LongTermProtection>] [-PassThru]
 [-ShortTerm <DataLocation>] [-Confirm] [-WhatIf] [<CommonParameters>]

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

Examples

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

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

The first command gets the protection group on the System Center 2016 - Data Protection Manager (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.

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

PS C:\>$PGroup = New- DPMProtectionGroup -DPMServerName "DPMServer02"
PS C:\> Set-DPMProtectionType -ProtectionGroup $PGroup -ShortTerm Disk -LongTerm 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.

Parameters

-LongTerm

Specifies that the protection group is set to long-term tape protection. The acceptable values for this parameter are:

- Tape

  • Online
  • OnlineAndTape

Type:LongTermProtection
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.

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

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

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

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

Type:DataLocation
Required:False
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
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.

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