Script repository

Disallow adding groups to other groups

Updated on: Jan 18, 2026, Views: 4684

Group membership

The script cancels adding groups as members to other groups. To execute the script, create a business rule triggering Before adding a member to a group. When there is an attempt to add a group to another group, the rule will cancel the operation.

$member = $Context.BindToObjectByDN("%member%")

if ($member.Class -ieq "group")
{
    $Context.Cancel("You cannot add groups to other groups!") # TODO: modify me
}

Comments 0

You must be signed in to comment.

    Got questions?

    Support Questions & Answers

    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.