Kaspersky Security Center 14.2 Windows
Managing device tags by using the klscflag utility

To assign a set of tags to a device, you need to run the klscflag utility on the client device to which you want to assign tags.

The klscflag utility overwrites the existing set of tags assigned to the device. This means, that you can add new tags, or remove specific tags by specifying the desired set of tags in the command. The utility does not have separate commands for adding or removing individual tags. Instead, you modify the entire set of tags.

To assign tags to your device by using the klscflag utility:

  1. Run the Windows command prompt by using administrator rights, and then change your current directory to the directory with the klscflag utility. The klscflag utility is located in the folder where Network Agent is installed. The default installation path is <Disk>:\Program Files (x86)\Kaspersky Lab\NetworkAgent.
  2. Enter one of the following commands:
    • To assign a set of tags:

      klscflag -ssvset -pv 1103/1.0.0.0 -s KLNAG_SECTION_TAGS_INFO -n KLCONN_HOST_TAGS -sv "[\"TAG NAME 1\",\"TAG NAME 2\",\"TAG NAME 3\"]" -svt ARRAY_T -ss "|ss_type = \"SS_PRODINFO\";"

      where [\"TAG NAME 1\",\"TAG NAME 2\",\"TAG NAME 3\"] is the list of tags you that want to assign to your device.

      If you leave the square brackets empty, this will remove all tags from the device:

      klscflag -ssvset -pv 1103/1.0.0.0 -s KLNAG_SECTION_TAGS_INFO -n KLCONN_HOST_TAGS -sv "[]" -svt ARRAY_T -ss "|ss_type = \"SS_PRODINFO\";"

    • To assign a new tag to an existing set of tags:

      klscflag -ssvset -pv 1103/1.0.0.0 -s KLNAG_SECTION_TAGS_INFO -n KLCONN_HOST_TAGS -sv "[\"NEW TAG NAME\",\"TAG NAME 1\",\"TAG NAME 2\",\"TAG NAME 3\"]" -svt ARRAY_T -ss "|ss_type = \"SS_PRODINFO\";"

      where NEW TAG NAME is the name of the tag that you want to assign to your device and TAG NAME 1, TAG NAME 2, TAG NAME 3 are the names of the tags already assigned to the device.

    • To remove a specific tag without removing other tags already assigned to the device, run the command with the updated set of tags.

      For example, if your current tags are TAG NAME 1, TAG NAME 2, TAG NAME 3 and you want to remove TAG NAME 2, run the following command:

      klscflag -ssvset -pv 1103/1.0.0.0 -s KLNAG_SECTION_TAGS_INFO -n KLCONN_HOST_TAGS -sv "[\"TAG NAME 1\",\"TAG NAME 3\"]" -svt ARRAY_T -ss "|ss_type = \"SS_PRODINFO\";"

  3. Restart the Network Agent service.

The klscflag utility assigns the specified tags to your device. To make sure that the klscflag utility has assigned the specified tags successfully, view tags assigned to the device.

Alternatively, you can assign device tags manually.