You assign a managed host to user-defined groups. This does the same as adding hosts to groups, but from the perspective of each host and the groups it should belong to, rather than adding hosts to a single group.
Login as a user with full permissions or as the admin user.
In the Hosts list, expand a group and select a single managed host.
Do one of the following:
From the tool bar, click the Edit Host button.
Right-click the managed host and choose Edit.
From the Hosts menu, choose Edit.
The Host Properties window opens.
In the Groups list, select a group and click the Add button.
The host is added to the selected group. You can assign a managed host to multiple user-defined groups of any hierarchy.
Click OK.
The Host Properties window closes.
The Add Host to Group command allows you to add a single host to a single group. See Add Host to Group (-ahg) Command.
See Example 4–1 for an example script.