Issue
An administrator deploying the Automox agent with the Install-AXAgentMSI.ps1 script needs to place devices into a specific group at install time. Common symptoms when this goes wrong include:
- A device registers into the Default group instead of the group specified with
-GroupName. - Devices deployed with an older version of the script repeatedly reinstall the agent and, in some cases, disappear from the console entirely.
Environment
- Automox (current agent release)
- Windows devices
- Install-AXAgentMSI.ps1 deployment script (run manually, or repeatedly via GPO/RMM)
- Console areas: Devices, Manage > Groups
Overview
How the script assigns groups, and what to expect:
- Group assignment happens once, at installation. After a successful agent install, the script sets the group, then performs a brief deregister/re-register cycle and restarts the agent service so the device registers with the group applied. The device may appear in the console, briefly drop, and reappear in the target group within a few minutes — this is expected during initial registration.
-
The script builds the full group path for you. It automatically prefixes
Default Group/to whatever names are supplied, producingDefault Group/<ParentGroupName>/<GroupName>(orDefault Group/<GroupName>when no parent is given). Pass bare group names only — never includeDefault Group, slashes, or the parent's own parent in the values. - Only one level of nesting is supported. The script accepts one parent group and one child group. Groups nested more deeply cannot be targeted with this script.
- Re-running the script does not move a device. If the agent is already installed and the service is running, the script exits without reinstalling or changing the group. To move an existing device, change its group in the console instead.
- The group must already exist. The script does not create groups; names must exactly match the group names configured in the console.
Resolution
- Download the current version of the script from the Automox Community GitHub repository. Older copies of the script (downloaded before mid-2025) should be replaced — see Notes.
-
Run the script as an administrator with at least the organization access key:
Install-AxAgentMsi.ps1 -AccessKey xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -
To assign the device to a group directly under the Default Group, add
-GroupName:Install-AxAgentMsi.ps1 -AccessKey xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -GroupName "Sales Laptops" -
To assign the device to a child group, add
-ParentGroupNamewith the immediate parent only:Install-AxAgentMsi.ps1 -AccessKey xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -GroupName "Sales Laptops" -ParentGroupName "North America"Do not include the parent's parent in the value.
-ParentGroupName "Global/North America"fails; use-ParentGroupName "North America". If the parent group is the Default Group itself, omit-ParentGroupNameentirely. - Verify in the console under Devices that the device appears in the expected group. Allow a few minutes for the initial registration cycle to complete.
Notes
Device installs but lands in the Default Group
- Confirm the group and parent group names exactly match the names shown in the console, and that the groups exist before deployment.
- Script versions earlier than 2.0.3 contained a parameter-passing issue that could prevent group assignment when the script was deployed through GPO with
-ParentGroupNamespecified. Replace older copies with the current script. - The script only sets the group immediately after a fresh installation. Running it against a device that already has the agent does not move the device.