Members can't remove themselves

Андрей Михалевский 3,201 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,292 questions
{count} votes

Accepted answer
  1. Xintao Qiao-MSFT 3,285 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

1 additional answer

Sort by: Most helpful
  1. Xintao Qiao-MSFT 3,285 Reputation points Microsoft Vendor
    2024-07-09T02:23:39.12+00:00

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

    Great to know that you have found a solution and thanks for sharing the solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "[The question author cannot accept their own answer. They can only accept answers by others] (Accept answers on Microsoft Q&A | Microsoft Learn)", I'll repost your solution in case you'd like to "[Accept] (Accept answers on Microsoft Q&A | Microsoft Learn)" the answer)     

    --------------   

    Issue Symptom: 

     Members cannot be removed from a security group by themselves.

     

    Resolution: 

    Convert a security group to a distribution group, and when you're done, convert it to a security group again.

     

    Accepting the answer will help others who are having the same problem as you. Thank you for your understanding and support.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.