The add-host-group command assigns a managed host to a group.
To get valid values for the -h parameter, use the -lah command.
Valid values and results for the -g parameter:
If the group exists (use the -lg command), the host is added to it.
If the group does not exist, it is created and the host is assigned to it.
If the group exists, but has a parent not given in the CLI command, a new top-level group is created by the same name. You can have same-named groups of different hierarchies.
If the named group is written as a nested group (“parent/nested”), and this group-path does not exist, all the groups are created.