We use cookies to improve your experience.
By your continued use of this site you accept such use.
For more details please see our privacy policy and cookies policy.

Script Repository

Remove object from group after being added to another group

March 17, 2021 Views: 1606

You can use the following script to remove an AD object from a group after it has been added to another group. To use it with Adaxes, you need to create a business rule triggered after adding a member to a group. Use the Run a program or PowerShell script action to execute the script.


  • $groupDN - specifies the distinguished name (DN) of the group to remove the user from.
Edit Remove
$groupDN = "CN=Group1,CN=Users,DC=example,DC=com" # TODO: modify me

$objectPath = "Adaxes://%member%"

$group = $Context.BindToObjectByDN($groupDN)
Comments 0
Leave a comment

Got questions?

Support Questions & Answers