Rename-ProtectionGroup

Rename-ProtectionGroup

Renames an existing protection group on the DPM server.

Syntax

Rename-ProtectionGroup [-ProtectionGroup] <ProtectionGroup> [-NewName] <String> [-PassThru <SwitchParameter>] [<CommonParameters>]

Detailed Description

The Rename-ProtectionGroup cmdlet renames an existing protection group with a new name. The process of renaming a protection group involves the following steps –
1. Retrieve the protection group using the Get-ProtectionGroup cmdlet.
2. Make the protection group modifiable using the Get-ModifiableProtectionGroup cmdlet.
3. Rename the protection group using the Rename-ProtectionGroup cmdlet.
4. Save the changes using the Set-ProtectionGroup cmdlet.

Parameters

-ProtectionGroup

The name of a protection group.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByValue)

Position?

0

-NewName

The new name for an object.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

1

-PassThru

The -PassThru parameter can be used with many commands in DPM to return a related object in cases where there is no default output. Using the PassThru parameter allows such cmdlets to be part of a pipeline.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-CommonParameter

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

Input and Return Types

The input type is the type of the objects that you can pipe to the cmdlet. The return type is the type of the objects that the cmdlet emits.

Notes

  • For more information, type "Get-Help Rename-ProtectionGroup -detailed".
    For technical information, type "Get-Help Rename-ProtectionGroup -full".

    Additionally, any updated information about the cmdlet will be available at http://go.microsoft.com/fwlink/?LinkId=95130.

Examples

EXAMPLE 1

$pg = Get-ProtectionGroup - DPMServerName 'TestingServer' 
$mpg = Get-ModifiableProtectionGroup $pg 
Rename-ProtectionGroup -ProtectionGroup $mpg -NewName 'ModifiedPG' 
Set-ProtectionGroup $mpg 
                           

This command renames the protection group Trial PG to Modified PG.