0 votes

HI Support,

I'm looking for a business Rule that remove a user from a couple of groups after the User is added to a group.

ie
1. The User MaxMi is added to the Group “MyGroup1”
2. After adding MaxMi to the Group MyGroup he will be removed from the Groups “MyGroup2” and “FirstGroup”

I created a businessrule which is triggered after adding a User to the Group with the Name “MyGroup”. Now I’m not able to create a powershell scripts for removing the added user from the other Groups.

Thx,

by (700 points)

1 Answer

0 votes
by (215k points)
selected by
Best answer

Hello,

In Business Rules triggered after adding or removing a member from a group, you can use the %member% value reference that returns the Distinguished Name (DN) of the member that was added or removed. For an example on how to use it, see the following article in our Script Repository: http://www.adaxes.com/script-repository ... p-s280.htm.

Related questions

0 votes
1 answer

Currently, when I disable a user account in Adaxes, the group memberships of the user remain intact. I'd like to automate the removal of group memberships such as distribution ... a list of groups/DL that the user was previously in and removed from. Thanks!

asked Nov 3, 2021 by jayden.ang (20 points)
0 votes
1 answer

I have a scheduled task that runs a Powershell script against an AD group, "Group 1". I need to get all of the members of Group 1, and add them to Group 2. The ... identity in the error message start with 'user;'? What is the correct way to accomplish this?

asked Aug 27, 2019 by ngb (90 points)
0 votes
1 answer

Hi I need to execute the script when user is added to a group. In that script I need to access group properties - name, etc. and user's properties. I have no problem ... don't think Initiator is giving me the right user. Any help will be much appreciated. V.

asked Oct 31, 2017 by xirurg (100 points)
0 votes
1 answer

Hi Using Adaxes 3.13.18001.0 on Server 2019 I'm adding a self service option for our domain users to be able to add people to groups they are set as the owner of but ... everywhere? I've checked the config page a number of times and can't see anything. Thanks

asked Jan 22, 2021 by chappers77 (1.2k points)
0 votes
1 answer

Every role-based-group starts with "arbg-" Users should only be in 1 arbg- group To enforce this, on any user change I would like to remove them from any "arbg- ... -Identity <SamAccount> | Select Name | Where-Object {$_.Name -Like 'ARBG*'}

asked Apr 29 by stevehalvorson (20 points)
2,757 questions
2,491 answers
6,523 comments
1,468,872 users