0 votes

When creating a new computer record you have the opportunity to choose a user/group whom can add the physical computer.

Looking in the Adaxes log I note that this is added by specifying the SID value of the selected entry. However when checking the computer record itself I see no corresponding attribute that holds this value.

Is there any way of automatically inserting the SID using a Business Rule/Property Pattern so that a pre-defined group is always set without having to select it every-time? I also tried looking for a Powershell command that did so but couldn't find one?

Thanks

by (1.6k points)
0

I second this. Would love to be able to auto fill this field with the initiator or a group.

1 Answer

0 votes
by (216k points)

Hello,

Currently there is no built-in functionality for that, but you can accomplish your task with a PowerShell script. To do this, you need to create a Business Rule that will be launched after creating a computer account and that will set the group who can join a computer to a domain with the help of a Run a program or PowerShell script action and a script. To create such a Business Rule:

  1. Create a new Business Rule.

  2. On the 2nd step of the Create Business Rule wizard, select Computer and After Creating a Computer.

  3. On the 3rd step, add the Run a program or PowerShell script action and paste the following script in the Script field:

     $groupName = "My Group" # TODO: modify me
    
     Import-Module Adaxes
     $group = Get-AdmGroup $groupName -Server $Context.GetObjectDomain("%distinguishedName%")
     if ($group -eq $NULL)
     {
         $Context.LogMessage("Group $groupName was not found!", "Error")
         return
     }
     $Context.TargetObject.Put("adm-UserOrGroupThatCanJoinComputerToDomain", $group.SID.ToString())
     $Context.TargetObject.SetInfo()
    
  4. In the script, $groupName specifies the name of the group, members of which will be able to join the computer to a domain. Specify the name of the necessary group.

  5. Enter a short description for the script and click OK.

  6. Finish creation of the Business Rule.

That should do the job for now. Starting from our next version (Adaxes 2013.1) we'll add the functionality to set the user or group who can join a computer to a domain with a Business Rule action, and you won't need the script to do this.

Related questions

0 votes
1 answer

Looking to add a delegated permission for a specific OU for a security role (Help-Desk) to provide the ability to join machines to the domain and also rename the machines in domain.

asked Apr 14, 2023 by Vish539 (310 points)
0 votes
0 answers

We have a multiforest set up. One of the domains is a non hybrid. Whenever a user is created in that domain it gives an error saying- 'Property 'ms-exch-target- ... active Directory schema'. How can we write an exception while adding to that non-hybrid domain?

asked Oct 31, 2022 by Aishwarya Gavali (40 points)
0 votes
1 answer

In order to add a managed domain does it have to be trusted by the primary domain adaxes is installed an running in? I have set up a domain for testing adaxes and it ... I have set my host file to point the untrusted domain to it's primary Domain Controller.

asked Oct 5, 2022 by mightycabal (1.0k points)
0 votes
1 answer

They can navigate to both the user or the group within the ADAXES web interface without issue. They can then either Add to Group or Add Member but the resulting ... something to the web interface which prevents changing the lookup domain. Any ideas? Thanks!

asked Apr 9, 2020 by VTPatsFan (610 points)
0 votes
1 answer

Hello, I would like to create a custom command "Add domain user to local admin group". The powershell command to execute this is quite easy. Where I'm struggling is another ... exist. Is it possible to create such a task without a custom form? Many thanks.

asked Aug 29, 2017 by HorstR (460 points)
3,350 questions
3,051 answers
7,791 comments
545,067 users