Managing HCL UnO agent using the daemon script in Windows operating systems

When you install the agent for the first time, the process creates a daemon-install script that can be used to manage HCL UnO agent afterward.

Before you begin

You must have configured the HCL UnO agent to create the scripts. For more information, see Installing HCL UnO agent.

About this task

When you configure the agent, the daemon-install.ps1 scripts is created with HCL_agent_name.service and osh.exe files.

Procedure

  1. Navigate to the folder that contains the daemon-install.ps1 script.
  2. Open PowerShell as Administrator, and then run the daemon-install.ps1 script:
    daemon-install.ps1
  3. Press Enter.

Results

You have successfully installed HCL UnO agent as a daemon service. You can finally use the HCL UnO agent; if you want to manage the HCL UnO agent you can also use the commands described in the following section.

What to do next

The HCL_agent_name.service file defines the properties of the daemon script that runs the agent. The osh.exe is a command line program that parses the command line arguments and calls the appropriate method described in the HCL_agent_name.service file. This command line tool reads and parse the HCL_agent_name.service file structure that holds the configuration for the service. It then provides the following commands to manage the service that runs the agent on a Windows environment. The supported commands to efficiently manage the agent are:
  • install: installs HCL UnO agent as a daemon script.
  • start: starts HCL UnO agent as a daemon script.
  • stop: stops HCL UnO agent.
  • remove: removes HCL UnO agent.
    Note: Before using the remove command, you must perform the stop command.
If you want to stop or remove the agent, or if you want to restart the agent after stopping, perform the following steps:
  1. Navigate to the folder that contains the osh.exe file.
  2. Run the osh.exe using PowerShell as Administrator.
  3. Enter the required command with path to the HCL_agent_name.service file as follows:
    .\osh.exe [stop | remove | install | start] [path to the HCL_agent_name.service file]
  4. Press Enter.

You have successfully run the required commands.