Rename-DPMRole
Rename-DPMRole
Changes the name or description of a DPM role.
Syntax
Parameter Set: Default
Rename-DPMRole [-DpmRole] <DpmRole> [[-Name] <String> ] [[-Description] <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Rename-DPMRole cmdlet changes the name or description of a System Center 2012 – Data Protection Manager (DPM) role. DPM roles allow Microsoft SQL Server database owners to recover databases without assistance from a DPM administrator. Save your changes by using the Set-DPMRole cmdlet.
Parameters
-Description<String>
Specifies a description for the DPM role.
Aliases |
none |
Required? |
false |
Position? |
3 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-DpmRole<DpmRole>
Specifies a DPM role object. To obtain a DPM role object, use the Get-DPMRole cmdlet.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Name<String>
Specifies a name for the DPM role.
Aliases |
none |
Required? |
false |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
false |
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.
Notes
- For more information, type "
Get-Help Rename-DPMRole -detailed
".
Examples
Example 1: Change the name of a role
This example changes the name of a DPM role.
The first command gets the role by using the Get-DpmRole cmdlet and stores it in the $DpmRole variable. The command makes the role editable.
The second command renames the role stored in the $DpmRole variable.
The third command saves the change made in the second command for the role stored in the $DpmRole variable by using the Set-DPMRole cmdlet.
PS C:\> $DpmRole = Get-DpmRole –Name "OpsMgrSQL" -Editable
PS C:\> Rename-DPMRole -DpmRole $DpmRole -Name "OpsMgrSQL23"
PS C:\> Set-DPMRole -DPMRole $DpmRole