Skip to main content

WMI CLI

The MetricsHub WMI CLI allows you to execute WMI queries on remote systems. It supports querying namespaces, retrieving system information, and managing resources.

Syntax

wmicli HOSTNAME --username USERNAME --password PASSWORD --namespace NAMESPACE --query QUERY --timeout TIMEOUT

Options

OptionDescriptionDefault Value
HOSTNAMEHostname or IP address of the WMI-enabled device. This option is requiredNone
--usernameUsername for WMI authentication.None
--passwordPassword for WMI authentication. If not provided, you will be prompted interactively.None
--timeoutTimeout in seconds for WMI operations.30
--queryWMI query to execute.None (required)
--namespaceNamespace for the WMI query.None (required)
-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 WMI Query

wmicli dev-01 --username admin --password secret --namespace "root/cimv2" --query "SELECT * FROM Win32_OperatingSystem" --timeout 30

Example 2: Interactive Password Input

wmicli dev-01 --username admin --namespace "root/cimv2" --query "SELECT * FROM CIM_ManagedElement"

The CLI prompts for the password if not provided.