Share via


Remove-DPMSecurityGroup

Removes security groups from a DPM role.

Syntax

Default (Default)

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

Description

The Remove-DPMSecurityGroup cmdlet removes one or more security groups from 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 Add-DPMSecurityGroup cmdlet to add security groups to a DPM role.

Examples

Example 1: Remove a security group from a role

PS C:\>$DpmRole = Get-DPMRole -Name "OpsMgrSQL" -Editable
PS C:\> Remove-DPMSecurityGroup -DpmRole $DpmRole -SecurityGroups "DpmDom02\Administrator"

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 removes the security group DpmDom02\Administrator from the role in $DpmRole.

Parameters

-All

Indicates that the action affects all objects that the cmdlet refers to.

Parameter properties

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

Parameter sets

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

-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 from which this cmdlet removes security groups. 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 removes these groups from the DPM role.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:False
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.