Set-DPMRole

Saves changes to a DPM role.

Syntax

Set-DPMRole
   [-DpmRole] <DpmRole>
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-DPMRole cmdlet saves changes you make to a System Center - Data Protection Manager (DPM) role. DPM roles let Microsoft SQL Server database owners to recover databases without assistance from a DPM administrator.

You can change the name or description of a DPM by using the Rename-DPMRole cmdlet. Use the Add-DPMSecurityGroup cmdlet to add the role to appropriate security groups. Use the Add-DPMRecoveryItem cmdlet to specify instances of SQL Server and SQL Server databases that DPM protects. Use the Add-DPMRecoveryTarget cmdlet to specify target computers that run SQL Server.

Examples

Example 1: Save a change to 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 by using the Rename-DPMRole cmdlet.

The third command saves the change made in the second command for the role stored in $DpmRole.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
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
Position:1
Default value:None
Required:True
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
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False