Share via


Add-DPMSecurityGroup

Adds security groups to a DPM role.

Syntax

Default (Default)

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.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:DpmRole
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SecurityGroups

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

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.