Set-DPMProtectionType

Sets the protection type for a protection group.

Syntax

Set-DPMProtectionType
   [-ProtectionGroup] <ProtectionGroup>
   [-ShortTerm <DataLocation>]
   [-LongTerm <LongTermProtection>]
   [-PassThru]
   [-WhatIf]
   [-Confirm]
   [<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 2019 - 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

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-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
Position:Named
Default value:None
Required:False
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
Required:False
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
Position:1
Default value:None
Required:True
Accept pipeline input:True
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
Position:Named
Default value:None
Required: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
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False