0 votes

Hey Support,

i hope you can help me with this and how to build it in Adaxes. I want to have a one click action, like a custom command, in the web interface that does the following things:

  • Remove user from (static) group A
  • Add user to (static) group B
  • Update the members dynamic groups C & D

Thanks for your assistance,


by (110 points)

1 Answer

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

Hello Markus,

It can be done using a custom command configured for the User object type. The command will have two built-in actions for adding/removing the user from groups and a PowerShell script to force membership update of rule-based groups. The command will look like the below: image.png Here is the script for forcing group membership update. In the script, the $groupDNs variable specifies distinguished names (DNs) of the rule-based groups whose membership update should be forced. For information on how to get an object DN, see https://adaxes.com/sdk/HowDoI.GetDnOfObject.

$groupDNs = @("CN=group1,OU=Groups,DC=domain,DC=com", "CN=group2,OU=Groups,DC=domain,DC=com") # TODO: modify me

foreach($dn in $groupDNs)
    $group = $Context.BindToObjectByDN($dn)
    $group.Put("adm-GroupMembershipUpdateNow", $True)

Related questions

0 votes
1 answer

Would it be possible to update this script to modify three or more attributes based off one? ex. when updating departmentnumber "0666" we want the following attributes to update ... and dept number). http://www.adaxes.com/script-repository ... e-s379.htm

asked Mar 7, 2017 by willy-wally (3.2k points)
0 votes
1 answer

Hi The Custom Commands edil Box Send more symbols. If type the symbols $ the will output '$ How can I fix it? Input Output

asked May 31 by will.chc.join (90 points)
0 votes
1 answer

Hi. I am create a Custom Commands. The Custom Commands will run a powshell by user. Is it possible for me to require the user to verify the passwordagain when performing these Custom Commands?

asked May 20 by will.chc.join (90 points)
0 votes
1 answer

For a custom command, I need to perform some actions, then reboot a computer, then perform some more. How can we handle the reboot so the actions continue once the computer is back up and ready? Thanks

asked May 17 by jcrook (60 points)
0 votes
1 answer

Hi Is there any possibility to add groups to "Operations" Panel, especially custom commands, in the WebGUI on the user like we can ... Custom Commands Offboarding Offboarding Initiation Offboarding Initiation Fasttrack Notifications Update Mobile Contract

asked Jul 30, 2021 by m.car (80 points)
2,800 questions
2,534 answers
59,560 users