0 votes

I have a need to remove certain users from "Domain Users" and set their primary group to a custom one.

I can't seem to find anyway in Adaxes to set a primary group. Trying to remove the user from Domain Users results in an error stating can't remove the user from their primary group.

Running on 2011.1 trial version at the moment.

by (90 points)

1 Answer

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

At the moment Adaxes doesn't allow you to change the primary group membership of AD objects using the Member or Member Of dialogs. This feature is in our TODO list.
For now I suggest you create a Custom Command for this purpose.

This Custom Command should perform the following actions:

  • Add the user to the new primary group (using the standard Add to Group action)
  • Set the Primary Group ID property of the user to the value of the primaryGroupToken property of the primary group
  • Remove the user from the old primary group (using the standard Remove from Group action)

0

Thank you. That works.

There wouldn't happen to be a way to have the custom command automatically kick off upon user creation?

0

Hello,

If you want to automatically change the primary group of newly created users, you need to create a Business Rule that will be triggered after creation of new users and perform the same actions that your Custom Command does.
On how to create a Business Rule that is triggered after user creation, see Automatically Add Users to Groups by Department.

0

I made a Business rule for it. Works perfectly!

Thank you

Related questions

0 votes
1 answer

We have a need to set a group that is not domain users as the primary group. Is there an action we can do on a selected user to check the group we want as the primary group to that selected group?

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

I need set, or verify, that all of my users have the same primary email alias suffix. Several years ago, we rebranded to a new internet presence. All users yhave both ... really a very great answer. Looking for automation, and we are an Adaxes supported shop.

asked May 14, 2021 by IanMcLaws (20 points)
0 votes
1 answer

Hi, we need to create some form (or custom command?) so managers of distribution groups can add/remove/change alias address. Primary and secondary. Distribution groups are ... contains list of current aliases with possibility to edit them... Thank you Sebela

asked Nov 18, 2019 by KIT (520 points)
0 votes
1 answer

Hi, I came across this in the SDK for setting the OU in a Business Rule before object creation $destOU = $Context.Action.TargetContainer if ($destOU.AdsPath.Contains("Marketing ... OU before creation, rather than create it then move, is there a way? Thanks,

asked Apr 25, 2014 by dazbo (390 points)
0 votes
1 answer

We have the following script we need fixed to run within Adaxes to add true/false value to a customattribute for use in building dynamic distribution lists. $users = ... } else { Set-Mailbox -Identity $user.Name -CustomAttribute8 "Individual contributor" } }

asked Jul 13 by willy-wally (3.2k points)
2,779 questions
2,512 answers
6,574 comments
26,146 users