Skip to main content

Hi there,



Basically what I’m looking for is if the automox api has any options to update an automox group with the machine you are currently on?



Scenario:


IT Images a machine, goes through their post install script(s) now they need to manually go into automox and add the new host to the proper group. What would be ideal is during a post install script that we can pull the hostname of the machine and use it to update what group the machine is in in automox. Would this be possible or do we currently have to have the host ID found in automox?

You’re in luck. We have the API option for now:


https://developer.automox.com/openapi/axconsole/operation/updateDevice/

 

and we’re about to release a new version of the agent that will let you put the group parameter in the MSI so it will go right into the group you want as part of the install:
 

 

 


Great news for folks deploying the AX agent in bulk or individually. We will be enabling users to identify a target group with a new group parameter in the MSI executable via command line.
Groups will still have to be set-up ahead of time in the console, but this should help save time as you bulk add new hosts to your organizations and get them on policy runs as quickly as possible. Please be on the look-out for agent command line guide updates and other helpful tips for using this parameter.
W…

 

 

 

 


This would require that you know the device ID within automox correct? Trying to find a way to automate the process.



And would the group parameter be included in the linux installer as well?



Thanks


Yep, and you can quickly get the device IDs by filtering the recently added devices (or whatever filter you need) and then exporting to CSV. The first column has the device IDs. We also have a script here you could modify and replace the API call with a group change:

 

 


This script will let you run an arbitrary number of required software policies or worklets against a list of devices exported from the Devices page, in essence giving you a workaround to implement a dynamic group functionality.

Go to your devices page and filter for the devices you’d like to run the policies against.
Click the select all box to select all of those devices.
Click Export which will save a csv file that contains one line per device, named automox-devices.csv.
Replace YOUR_API_Key…

 

 

 

 

 

Not sure on the Linux version; let me find out and get back to you.

 


what about the amagent --setgrp command? Does this insinuate that I would be setting the group for the current machine running the amagent command from? I found some documentation on it, albeit limited. And it didn’t seem to work how I would have expected.


The --setgroup command should work too. That was broken earlier this year but it should be fixed now. Let me know if it isn’t working for you and I’ll get engineering to look into it.


One note on that, just running --setgrp won’t change it on the fly. That group param is used during install. You can stop the service, run --deregister then --setgrp and start it, and it will take the group.


and I got confirmation that the new installer MSI group flag will only work with Windows (since MSI is a Windows installer format).


That’s a bummer that this is only happening for windows.


–setgrp or doing it via the API should work, so let me know if you need help with getting those working properly. I can have support work with you to make sure it’s doing what you need.


Reply