2.5. On-demand CLI

The on-demand MetaAccess agents expose a command-line interface that allows a user to control how the on-demand agent is run.

Your solution can trigger our agent to run onetime and get device status to grant a device access to your resources. Pulse Secure integration is an example.

Windows Usage

1. Open a command prompt (as administrator if using admin version)

2. Navigate to the directory containing the On-demand MetaAccess executable

3. Run the executable with one or more options (license_key and server_code must be provided either in the executable name or in the options), for example:

OPSWAT_GEARS_Client_Admin.exe /key [license_key] /host [server_code] [options]

or

OPSWAT_GEARS_Client_Admin _[server_code]-[license_key].exe [options]

macOS Usage

1. Open a terminal
2. Navigate to the directory containing the on-demand MetaAccess zip file3. Navigate into the compressed archive: $ cd OPSWAT\ GEARS.app/Contents/Resources/4. Run the executable with one or more options (server_code is required; license_key will be read from the config in the zip file unless provided as an option), for example:$ ./opswat-gears-od /host [server_code] [options]

Options

/silent
Silent mode. No dialog pop-ups are shown.

/log 0 or 1
0 - Disable logging.
1 - Enable logging. (Windows: Creates log in executable’s directory. macOS: Creates a log on the current user’s desktop except when running as root).

/key license_key
Specify a MetaAccess license key (overrides the license key in the executable file name if present; required if not present in the file name).

/host server_code // 3445 for Production (gears.opswat.com), 2358 for Beta (gears-beta.opswat.com)
Specify a MetaAccess server (Windows: Overrides the server code in the executable file name if present; required if not present in the file name. macOS: Required when executing from the command line).

/mkey metadefender_cloud_key
Specify a MetaDefender Cloud key to use for malware scanning (overrides the MetaDefender Cloud key associated with the specified account_license_key).

/quick
Exclude DLLs and libraries during malware scan

/runonce 1 or 2
Perform a run once process.
1 - Run once and exit
2 - Run once and exit and open the remediation page in a default browser

3 - Run once and exit and open the remediation page in a default browser if threats are detected

4 - Run once and exit and open the remediation page in a default browser if the device is non-compliant

/h or /help
Show the help menu.

Exit Codes:

0 No errors.
50 Unhanded error. See log for details.
52 Native error. See log for details.
54 Service is not available.
55 Invalid parameter.
56 Could not reach the host.
200 Invalid MetaAccess or MetaDefender Cloud key.
206 Exceeded allowance for MetaDefender Cloud key.