Microsoft Windows 2000 Scripting Guide(c) Automating System Administration 2003

Microsoft® Windows® 2000 Scripting Guide

« Previous | Next »   

WMI consumers are the final layer in the WMI infrastructure. A consumer can be a script, an enterprise management application, a Web-based application, or some other administrative tool that accesses and controls management information available through the WMI infrastructure.

WMI consumers do not have to be complicated. The following three-line script, which returns the amount of free disk space on drive C, is an example of a WMI consumer:

Set objSWbemServices = GetObject("winmgmts:") Set objDisk = objSWbemServices.Get("Win32_LogicalDisk.DeviceID='C:'") Wscript.Echo objDisk.FreeSpace

Note


 Send us your feedback « Previous | Next »   

Категории