Rename-DPMRole

Changes the name or description of a DPM role.

Syntax

Rename-DPMRole [-DpmRole] <DpmRole> [[-Name] <String>] [[-Description] <String>] [-Confirm] [-WhatIf]
 [<CommonParameters>]

Description

The Rename-DPMRole cmdlet changes the name or description of a System Center 2016 - Data Protection Manager (DPM) role. DPM roles let Microsoft SQL Server database owners to recover databases without assistance from a DPM administrator. Save your changes by using the Set-DPMRole cmdlet.

Examples

Example 1: Change the name of a role

PS C:\>$DpmRole = Get-DpmRole -Name "OpsMgrSQL" -Editable
PS C:\> Rename-DPMRole -DpmRole $DpmRole -Name "OpsMgrSQL23" 
PS C:\> Set-DPMRole -DPMRole $DpmRole

The first command gets the role by using the Get-DpmRole cmdlet, and then stores it in the $DpmRole variable. The command makes the role editable.

The second command renames the role stored in $DpmRole.

The third command saves the change made in the second command for the role stored in $DpmRole by using the Set-DPMRole cmdlet.

Parameters

-Description

Specifies a description for the DPM role.

Type:String
Required:False
Position:3
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DpmRole

Specifies a DPM role that this cmdlet modifies. To obtain a DPM role object, use the Get-DPMRole cmdlet.

Type:DpmRole
Required:True
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies a name for the DPM role.

Type:String
Required:False
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
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.

Type:SwitchParameter
Aliases:wi
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False