1. Introduction
WMI is an administrative support technology for Windows, and WMI was originally released as an add-on in 1998 with Windows NT 4.0 Service Pack 41, which is built into Windows 2000, Windows XP, and Windows Serve The core management support technology in the R 2003 series operating system.
WMI is a specification and infrastructure through which you can access, configure, manage, and monitor all-almost all Windows resources.
2.WMI Script Programming first experience
Let's look at an example: retrieving total physical memory using WMI and VBScript
'//'. " represents the native
Const def_strcomputer = "."
'//in anyWMIscript, the first step is to create aWindowsa connection to a management service, such as:'//set wbemservices = GetObject ("winmgmts:\\Computer name")Set wbemservices = Getobject("winmgmts:\\.")Set wbemobjectset = wbemservices. InstancesOf ("Win32_LogicalMemoryConfiguration") forEach wbemobject in wbemobjectset WScript. Echo "Physical Memory: " & CInt(wbemobject. TotalPhysicalMemory / 1024x768) & "M bytes. "NextDownload Tools for 3.WMI development
WMI Administrative Tools (WMI CIM studio,wmi Object Browser) Download:
http://www.microsoft.com/downloads/details.aspx?familyid=6430F853-1120-48DB-8CC5-F2ABDC3ED314&displaylang= En
4. References
Getting Started with WMI scripting: part http://msdn.microsoft.com/zh-cn/library/ms974579.aspx
Getting Started with WMI scripting: Part Two http://msdn.microsoft.com/zh-cn/library/ms974592.aspx
Getting Started with WMI scripting: Part III http://msdn.microsoft.com/zh-cn/library/ms974547.aspx
Using wmi:http://msdn.microsoft.com/en-us/library/aa393964.aspx
Scripting API for wmi:http://msdn.microsoft.com/en-us/library/aa393258 (vs.85). aspx
WMI Scripting First Experience