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.
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
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".