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

3.7: Network components providers

3.7 Network components providers

3.7.1 Ping provider

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.)

Table 3.58: The Ping Providers Capabilities

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...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Optical Line Terminals
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.