Поделиться через


Remove-DPMSecurityGroup

Remove-DPMSecurityGroup

Removes security groups from a DPM role.

Syntax

Parameter Set: Default
Remove-DPMSecurityGroup [-DpmRole] <DpmRole> [[-SecurityGroups] <String[]> ] [-All] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

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

Parameters

-All

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DpmRole<DpmRole>

Specifies a DPM role from which this cmdlet removes security groups. To obtain a DPM role object, use the Get-DPMRole cmdlet.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SecurityGroups<String[]>

Specifies an array of security groups. The cmdlet removes these groups from the DPM role.

Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

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.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Remove a security group from a role

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.

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

Add-DPMSecurityGroup

Get-DPMSecurityGroup

Get-DPMRole

Set-DPMRole