|
<< Click to Display Table of Contents >> Raynet One > 2026.4 > User Guide > Workspaces in the sidebar menu > Configuration > Agent CLI reference |
The Raynet One agent provides command-line commands for performing operations on the local device. All commands must be run with administrator privileges on Windows or as root on Linux and macOS, because the agent's data folder is located in a system-level directory.
The agent executable is located in the agent installation directory. On Windows, run the commands from an elevated command prompt. On Linux and macOS, prefix each command with sudo or run them as root.
Purpose: Runs an inventory scan on the local device immediately, without waiting for the next server-scheduled job. The command performs a full device scan and either uploads the results to the platform through the runner or writes them to disk, depending on the options used.
When to use: Use this command when you need up-to-date inventory data from a specific device immediately, or when testing an agent installation. A job triggered by this command follows the same duplicate-detection rules as server-initiated jobs — see Inventory operations for details.
Required state: The agent must be in the Active operational state.
Requires administrator or root: Yes.
Command format (Windows):
Raynet.One.Agent.exe inventory [options]
Command format (Linux / macOS):
Raynet.One.Agent inventory [options]
Parameters:
Parameter |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
-d / --disk |
Boolean flag |
No |
false |
Stores the inventory results on the local disk instead of uploading them to the platform. Use this option when the device has no connection to a runner at the time of scanning. Results are written to the results/ subfolder of the agent's application data folder. |
Exit codes:
Exit code |
Meaning |
|---|---|
0 |
Inventory completed successfully. |
1 |
The agent is not in the required operational state. Enroll the agent first. |
2 |
An unexpected error occurred. Check the agent log for details. |
After the command: When the command completes without the --disk option, the inventory results are uploaded to the platform and the device's inventory record is updated. When used with --disk, the results are stored locally and uploaded at the next opportunity when the agent connects to the runner.
Purpose: Synchronizes the agent with the server. Depending on the current agent state, sync performs enrollment, updates the operational state, exchanges pending messages, and processes any incoming instructions from the server (such as new settings or job assignments).
When to use: Use this command when you need to apply updated settings immediately or when the agent has not yet enrolled after the enrollment file was placed on the device.
What gets synced:
•Operational state (enrollment, decommissioning, state updates from the server)
•Outgoing messages (results waiting to be sent to the server)
•Incoming messages (job assignments, settings updates, and other instructions from the server)
Required state: Active or Enrollment pending.
Requires administrator or root: Yes.
Command format (Windows):
Raynet.One.Agent.exe sync
Command format (Linux / macOS):
Raynet.One.Agent sync
Parameters: None.
Exit codes:
Exit code |
Meaning |
|---|---|
0 |
Sync completed successfully. |
1 |
The agent is decommissioned or in standalone mode and cannot sync. A factory reset and re-enrollment are required. |
2 |
An unexpected error occurred. Check the agent log for details. |
After the command: The agent's local state is updated to reflect the current server state. Any pending outgoing results are uploaded, and incoming instructions from the server are applied.
Purpose: Resets the agent to its post-installation state by deleting the agent's internal databases. After a factory reset, the agent must be re-enrolled before it can communicate with the platform or run inventory jobs.
When to use: Use factory reset when the agent is in an inconsistent or unrecoverable state and a clean re-enrollment is required, or when reassigning a device to a different scope or platform instance. See also Uninstallation for a comparison of factory reset and full uninstallation.
|
Warning: |
Required state: No operational state requirement. The command can run regardless of the agent's current state.
Requires administrator or root: Yes.
Command format (Windows):
Raynet.One.Agent.exe factory_reset
Command format (Linux / macOS):
Raynet.One.Agent factory_reset
Parameters: None.
Exit codes:
Exit code |
Meaning |
|---|---|
0 |
Factory reset completed. The agent databases have been deleted. |
After the command: The agent installation remains on the device, but the agent has no enrollment data and cannot communicate with the platform. To restore the agent to a working state, place a valid enrollment file at the default location and run the bootstrap_enrollment command, or run sync if an enrollment file is already present.