| Windows Management Instrumentation (WMI) So you have seen the WMI samples in the FAQ, read a couple of articles but still cant figure out how this WMI scripting works. Your not alone! In this article I will attempt to give you an understanding of the WMI mechanics so that you will be able to derive your own scripts. The problem with WMI is that it is so big that trying to learn it from just looking at example scripts only lets you scratch the surface. Everything .NET from Microsoft will be WMI enabled and there is no doubt that this is the preferred method for system and application management. 2 upcoming products from MS are fully dependant on WMI: So if you want to be a top IT pro (and not a slave to the GUI) then you need to learn this stuff. Components of WMI All WMI files are stored under the system32\WBEM directory. WinMgmt.exe is run as an NT serverice (via svchost.exe on Windows XP). CimWin32.dll provides most of the Win32 provider fuctionality. To come: - WMI Background
- Definition of terms
- WMI Syntax
- WMI Data types
How to browse WMI Namespace - If you have W2K the go to the system32\wbem directory and run WBEMTEST
- Select 'Connect...' and change the namespace to root\cimv2
- Select 'Enum Classes...' and select 'OK'. This opens a Query Results window
- Scroll down the results until you get to the Win32_ section and double click on a class
- You can now see the available properties and methods
|