Rename-DPMProtectionGroup

Renames a protection group.

Syntax

Rename-DPMProtectionGroup
      [-ProtectionGroup] <ProtectionGroup>
      [-NewName] <String>
      [-PassThru]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Rename-DPMProtectionGroup cmdlet renames a protection group on the System Center - Data Protection Manager (DPM) server. The process of renaming a protection group requires the following steps:

Retrieve the protection group by using the Get-DPMProtectionGroup cmdlet.

Make the protection group modifiable by using the Get-DPMModifiableProtectionGroup cmdlet.

Rename the protection group by using the Rename-DPMProtectionGroup cmdlet.

Save the changes by using the Set-DPMProtectionGroup cmdlet.

Examples

Example 1: Rename a protection group

PS C:\>$PGroup = Get-DPMProtectionGroup -DPMServerName "DPMServer02"
PS C:\> $MPGroup = Get-DPMModifiableProtectionGroup -ProtectionGroup $PGroup
PS C:\> Rename-DPMProtectionGroup -ProtectionGroup $MPGroup -NewName "ProtectGroup02"
PS C:\> Set-DPMProtectionGroup -ProtectionGroup $MPGroup

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

The second command gets the protection group in a modifiable mode, and then stores the results in the $MPGroup variable.

The third command renames the protection group in $MPGroup to ProtectGroup02.

The fourth command saves all the actions on the DPM server that you performed on the protection group in $MPGroup.

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

-NewName

Specifies a new name for the protection group.

Type:String
Position:2
Default value:None
Required:True
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 that this cmdlet renames. 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

-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

Outputs

ProtectionGroup