Description
Validates whether Windows Management Instrumentation (WMI) is running and accessible on a remote host using either impersonation or explicit credentials.
Overview
This script attempts to connect to the WMI service (root\cimv2) on a specified remote host.
It supports two mutually exclusive parameter sets:
- Impersonation – Uses the current user’s security context.
- Credentials – Allows specifying a username and password for authentication.
The script returns a success or failure message based on whether the WMI scope connection is established.
It is designed for system administrators, red-team operators, and automated health-check workflows that require validation of remote WMI availability.
Parameters
PARAMETER TABLE
| Name | Type | Description |
|---|---|---|
| Target | string |
The hostname or IP address of the target system to validate WMI connectivity. Mandatory for all parameter sets. |
| Impersonate | switch |
Uses the current user’s impersonation token for WMI authentication. Only valid in the Impersonation parameter set. |
| Username | string |
Username for explicit authentication to remote WMI. Required in the Credentials parameter set. |
| Password | string |
Password associated with the provided username. Required in the Credentials parameter set. |
