Leveraging WMI Scripting: Using Windows Management Instrumentation to Solve Windows Management Problems

The Ping provider is a bit unusual, because it only supports the "Get" operation. Trying an "enumeration" operation makes no sense, since this provider reflects the result of the PING command execution. This provider only supports one class: the Win32_PingStatus class. (See Table 3.58.)
| Provider Name | Provider Namespace | Class Provider | Instance Provider | Method Provider | Property Provider | Event Provider | Event Consumer Provider | Support Get | Support Put | Support Enumeration | Support Delete | Windows Server 2003 | Windows XP | Windows 2000 Server | Windows 2000 Professional | Windows NT 4.0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| PING Provider | ||||||||||||||||
| WMIPingProvider | Root/CIMv2 | X | X | X | X | X |
Creating an instance of the Win32_PingStatus class to ping a host is not really useful, but combining this functionality with some other WMI capabilities can produce a useful tool to determine if a system is still alive on the network. If we use a script code to create and delete an Interval Timer, combined with some asynchronous event notifications, we can develop a script that will ping a selected host on a regular time interval basis. Moreover, we can send an email alert to the Administrator if the PING reply is not successful by reusing some of the function previously developed (i.e., SendAlert() function). The script reflects the PING.Exe command-line utility with some extra parameters...