Script Repository


Disallow adding groups to other groups

September 04, 2015
1092

The script can be used to disallow adding groups to other groups. When executed in a Business Rule triggered before adding a member to a group, it will cancel the operation if the new member is a group.

To use the script with Adaxes, you need to create a Business Rule triggered after adding or removing a member from a group that runs the script using the Run a program or PowerShell script action.

Edit Remove
PowerShell
$member = $Context.BindToObjectByDN("%member%")

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

Comments ( 0 )
No results found.
Leave a comment

Related Scripts