Remove-DPMSecurityGroup

Removes security groups from a DPM role.

Syntax

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

Description

The Remove-DPMSecurityGroup cmdlet removes one or more security groups from a System Center 2016 - 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.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DpmRole

Specifies a DPM role from which this cmdlet removes security groups. 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
-SecurityGroups

Specifies an array of security groups. The cmdlet removes these groups from 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