Telegraf agent installation on Windows server is failing with error "'wmic' is not recognized as an internal or external command, operable program or batch file."
search cancel

Telegraf agent installation on Windows server is failing with error "'wmic' is not recognized as an internal or external command, operable program or batch file."

book

Article ID: 438591

calendar_today

Updated On:

Products

VCF Operations/Automation (formerly VMware Aria Suite)

Issue/Introduction

  • When attempting to install the Telegraf agent on a Windows server  using the telegraf-utils.ps1 script, the installation fails with the following error :

    .\telegraf-utils.ps1 product-managed -c <cloud_proxy_ip_or_collector_group_name> -t <token> -v <vmwareariaoperations_ip_or_fqdn> -k 1

    wmic : The term 'wmic' is not recognized as the name of a cmdlet, function, script file, or operable program.
    Check the spelling of the name, or if a path was included, verify that the path is correct and try again.


  • Additionally, the C:\ProgramData\VMware\UAF\logs\uaf_bootstrap.log  may report the following failure:

    uaf-bootstrap - ERROR - Prerequisite Check Failed. Required patch for Universal C Runtime(CRT) not installed at endpoint. Please refer to Prerequisite section of documentation
    set EXIT_ERR_CODE-1
    set EXIT_ERR_ENUM-FAILED

Environment

Aria Operations 8.x
VCF Operations 9.x

Cause

The Telegraf agent installation script relies on the **WMIC** (Windows Management Instrumentation Command-line) utility to gather local system statistics and environment variables during the bootstrap process.
Installation is failing primarily due to the absence of the WMIC (Windows Management Instrumentation Command-line) utility on the Windows Server.

Resolution

To resolve this issue, you must manually enable or add the WMIC feature on the target Windows server.

Method 1: Using DISM (Command Line)

  1. Open Command Prompt or PowerShell as an Administrator.
  2. Execute the following command to add the WMIC capability:

    DISM /Online /Add-Capability /CapabilityName:WMIC~~~~



    DISM Capabilities Package Servicing Command-Line Options

Method 2: Using Settings (GUI)

  1. Navigate to Settings > Apps > Optional features.
  2. Click View features (or Add a feature).
  3. Search for WMIC.
  4. Select the checkbox and click Install.

    How to install WMIC Feature

Once WMIC is installed, retry the Telegraf installation using the below script command

.\telegraf-utils.ps1 product-managed -c <cloud_proxy_ip> -t <token> -v <aria_ops_fqdn> -k 1