The following advanced agent options are described here:  

  • Command Line Options
  • Running the Agent for the First Time
  • Adding to a Group on First Execution
  • Changing the Organization Key
  • Deregistering the Agent
  • Reinstalling the Automox Agent

Command Line Options 

The Automox agent supports command line options that can control how the agent is installed on the device. You can get a list of agent command options by executing the following code from the command line:

amagent --help

Running the Agent for the First Time

The first time the agent runs, it establishes its identifying information to the Automox servers. Some command line switches can only be specified the first time the agent is run on a device. Currently, this applies to the following commands:


If you need to reset the agent on a device in order to use these first-time commands, you can use the following command:--deregister

See Deregistering the Agent for more information.


This command defines the access key for your organization. It binds the agent and device to a specific organization in the Automox console. This can only be specified at the first time the agent is run on the device.


This command defines the Automox group that this agent should be placed in when it first connects with the Automox platform. This allows you to easily add the device to a group and is a no-touch way to specify the policies you want to add to the device.

Adding to a Group on First Execution

When using the –setgrp flag, you must predefine the Default Group/ to the group name that you are providing to the setgrp command. For example, to set the device group to the Engineering group, issue the following command:

amagent --setgrp 'Default Group/Engineering'

When specifying groups, remember to separate them with a forward-slash / character. If an agent is already associated with a group and you want to change this from the command line, you can issue a –deregister followed by the –setgrp to accomplish this:

amagent --deregister
amagent --setgrp 'Default Group/New/Group'

This command defines a temporary directory on a device where scripts and required software are temporarily stored.


This command resets the agent identity and other settings to allow it to re-register as a new device. See Deregistering the Agent for more information.

Changing the Organization Key

You can use command line options to change the organization key. Follow the steps for Reinstalling the Agent to be able to restart the installation process. See Running the Agent for the First Time.

Deregistering the Agent

When the Automox agent runs for the first time, it establishes an identity with the Automox servers using public-key cryptographic methods. If you ever need to reset the agent and have it re-register as a new device, you can deregister the agent.

Using the command line or terminal, run the following command corresponding to your operating system:


sudo /usr/local/bin/amagent --deregister


"C:\Program Files (x86)\Automox\amagent.exe" --deregister  


sudo /opt/amagent/amagent –deregister

Agent re-registration happens automatically when you run this command. If the device was listed on the Devices page of the console, the device entry is automatically updated with the new registration identity. If the device was previously deleted from the Devices page, deregistering the device adds it back to the list of devices being managed by Automox.

Reinstalling the Automox Agent

To reinstall the Automox agent, ensure that the agent has first been deregistered and then removed.

  1. Deregister the agent, as described here in Deregistering the Agent.
  2. Remove the agent. See Removing the Automox Agent.
  3. Follow the instructions in Installing the Automox Agent for your device.
Did this answer your question?