Members can't remove themselves

Андрей Михалевский 2,746 Reputation points
2024-07-03T15:56:44.1533333+00:00

Hi. Exchange 2016 on-premise.

I have Security Group, i need remove 1 member and 1 member i need add.

After this command i got error:

Set-DistributionGroup "MyGroup" -ManagedBy @{Add='a.mihalevskiy'} -BypassSecurityGroupManagerC

Members can't remove themselves from security groups. Please set the group to Closed for requests to leave.

Ok, i fixed with command: Set-DistributionGroup "MyGroup" -MemberDepartRestriction:closed

But i can't return 'open'

[PS] C:\Windows\system32>Set-DistributionGroup "MyGroup" -MemberDepartRestriction:Open

Members can't remove themselves from security groups. Please set the group to Closed for requests to leave.

+ CategoryInfo          : NotSpecified: (:) [Set-DistributionGroup], RecipientTaskException

+ FullyQualifiedErrorId : [Server=MS-EX05,RequestId=9d4b0caa-9b59-44c9-816e-397c4f421749,TimeStamp=7/3/2024 3:42:1

9 PM] [FailureCategory=Cmdlet-RecipientTaskException] D758F86C,Microsoft.Exchange.Management.RecipientTasks.SetDis

tributionGroup

Exchange Server
Exchange Server
A family of Microsoft client/server messaging and collaboration software.
1,172 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Xintao Qiao-MSFT 1,020 Reputation points Microsoft Vendor
    2024-07-04T09:59:38.1466667+00:00

    Hi, @Андрей Михалевский

    Based on your description, I understand that you failed to set the property parameters.

    1.Did you successfully add members? Based on the command you provided, I successfully added myself to the security group. It is just that the command adds myself as the owner of the security group. I do not include myself in the membership.

    User's image User's image

    2.Are you removing yourself from the security group owner, or from membership? What are the commands you use to remove a user?

    3.In addition, for parameter -MemberDepartRestriction, Closed is the default value of the universal security group, and the Open value cannot be used in the universall security group. Details can be found here Set-DistributionGroup (ExchangePowerShell) | Microsoft Learn

    User's image

    4.If you want to remove a user from a membership, you can use the command Remove-DistributionGroupMember -Identity "MyGroup" -Member. You can also implement the addition and removal of users in the EAC, but this requires you to have certain permissions, i.e. you are the owner of the group.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments