Rename-DPMProtectionGroup
Rename-DPMProtectionGroup
Renames a protection group.
Syntax
Parameter Set: Default
Rename-DPMProtectionGroup [-ProtectionGroup] <ProtectionGroup> [-NewName] <String> [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Rename-DPMProtectionGroup cmdlet renames a protection group on the System Center 2012 – Data Protection Manager (DPM) server. The process of renaming a protection group requires the following steps:
-- 1. Retrieve the protection group by using the Get-DPMProtectionGroup cmdlet.
-- 2. Make the protection group modifiable by using the Get-DPMModifiableProtectionGroup cmdlet.
-- 3. Rename the protection group by using the Rename-DPMProtectionGroup cmdlet.
-- 4. Save the changes by using the Set-DPMProtectionGroup cmdlet.
Parameters
-NewName<String>
Specifies a new name for the protection group.
Aliases |
none |
Required? |
true |
Position? |
2 |
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ProtectionGroup<ProtectionGroup>
Specifies a protection group that this cmdlet renames. To obtain a ProtectionGroup object, use the Get-DPMProtectionGroup cmdlet.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before running the cmdlet.
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.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
- ProtectionGroup
Examples
Example 1: Rename a protection group
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.
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