Add-DPMSecurityGroup

Adds security groups to a DPM role.

Syntax

Add-DPMSecurityGroup
   [-DpmRole] <DpmRole>
   [-SecurityGroups] <String[]>
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Add-DPMSecurityGroup cmdlet adds one or more security groups to a System Center - Data Protection Manager (DPM) role. You can use the Get-DPMRole to specify a DPM role. Use the Set-DPMRole cmdlet to save your changes.

You can see the security groups for a DPM role by using the Get-DPMSecurityGroup cmdlet. You can use the Remove-DPMSecurityGroup cmdlet to remove security groups from a DPM role.

Examples

Example 1: Add a security group to a role

PS C:\>$DpmRole = Get-DPMRole -Name "OpsMgrSQL" -Editable
PS C:\> Add-DPMSecurityGroup -DpmRole $DpmRole -SecurityGroups "Hq\OpsMgrSQL"

The first command uses the Get-DPMRole cmdlet to get the role named OpsMgrSQL and then stores it in the $DpmRole variable. The command makes the role editable.

The second command adds the specified security group to the role stored in the $DpmRole variable.

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 to which this cmdlet adds a security group. 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

-SecurityGroups

Specifies an array of security groups. The cmdlet adds these groups to the DPM role.

Type:String[]
Position:2
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