Skip to main content

WBEM CLI Documentation

The MetricsHub WBEM CLI allows you to execute WBEM queries on WBEM-enabled devices or systems. It supports querying namespaces, retrieving specific information, and accessing vCenter-hosted resources.

Before using the CLI, ensure your platform supports WBEM monitoring by checking the Supported Platforms.

Syntax

wbemcli HOSTNAME --namespace NAMESPACE --query QUERY --username USERNAME --password PASSWORD --vcenter VCENTER --transport PROTOCOL --port PORT --timeout TIMEOUT

Options

OptionDescriptionDefault Value
HOSTNAMEHostname or IP address of the WBEM-enabled device. This option is required.None
--queryWBEM query to execute.None (required)
--transportTransport protocol for WBEM: HTTP or HTTPS.HTTPS
--portPort of the WBEM server. By default, 5988 for HTTP, 5989 for HTTPS.Based on protocol
--usernameUsername for WBEM authentication.None
--passwordPassword for WBEM authentication. If not provided, you will be prompted interactively.None
--timeoutTimeout in seconds for WBEM operations.30
--namespaceWBEM namespace for the query. This option is required.None
--vcenterVCenter hostname providing the authentication ticket (if applicable).None
-vEnables verbose mode. Use -v for basic logs, -vv for detailed logs.None
-h, --helpDisplays detailed help information about available options.None

Examples

Example 1: Basic WBEM Query

wbemcli esx-01 --namespace "root/cimv2" --query "SELECT MajorVersion FROM VMware_HypervisorSoftwareIdentity" \
--username admin --password secret --vcenter hci-vcenter

Example 2: emc-san Namespace Query

wbemcli emc-san --namespace "root/emc" --query "SELECT DeviceID FROM EMC_DiskDrive" \
--transport https --username admin --password secret

Example 3: WBEM Query wih Interactive Password Input

wbemcli esx-01 --namespace "root/cimv2" --query "SELECT * FROM CIM_ManagedElement" --username admin

The CLI prompts for the password if not provided.