Dela via


Rename-DPMProtectionGroup

Renames a protection group.

Syntax

Default (Default)

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.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-NewName

Specifies a new name for the protection group.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ProtectionGroup

Specifies a protection group that this cmdlet renames. To obtain a ProtectionGroup object, use the Get-DPMProtectionGroup cmdlet.

Parameter properties

Type:ProtectionGroup
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

ProtectionGroup