1. Home
  2. Docs
  3. Using OPMONis
  4. Commandline Tool

Commandline Tool

OPMONis is providing a commandline tool, which allows controlling OPMONis from batch files or other UPS managment software:

  • Triggering a shutdown or power on of all systems
  • Check the actual state
  • Switch between the modes automatic and manual
  • Check the actual mode

You can find the commandline executable independis.OPMONis.Command.exe in the installation folder of the client components. The standard path for this is %ProgramFiles(x86)%\independis\OPMONis\Client

If you start the commandline tool without parameters, it will show you the following screen:

C:\Program Files (x86)\independis\OPMONis\Client>independis.OPMONis.Command.exe
OPMONis Commandline Tool 1.2.2.0
Commandline tool for controlling the OPMONis service.

Usage:
  independis.OPMONis.Command [command]

The following commands are supported:
  TriggerShutdown Initiates a shutdown job to be executed by the OPMONis service.
  TriggerStartup  Initiates a startup job to be executed by the OPMONis service.
  ManualMode      Switch the OPMONis service in manual operation mode.
  AutomaticMode   Switch the OPMONis service in automatic operation mode.
  QueryMode       Queries the current OPMONis service operation mode (Manual oder Automatic).
  QueryJob        Queries the job currently executed by the OPMONis service (Idle, QueryState, PowerOn, PowerOff).
  Pause           Wait until the user presses the enter key.

Exit Codes:
  If the command was executed successfully, the exit code is 0. If any error occured, the exit code is -1.

Examples:

  Initiates a PowerOff job to be executed by the OPMONis service:
    independis.OPMONis.Command TriggerShutdown

  Initiates a PowereOn job to executed by the OPMONis service:
    independis.OPMONis.Command TriggerStartup

  Switches the OPMONis service in manual operation mode:
    independis.OPMONis.Command ManualMode