Chapter 3. WMI in depth

This chapter covers

  • WMI structure
  • WMI cmdlets and accelerators
  • WMI Query Language
  • Discovering links between WMI classes

Windows Management Instrumentation, known as WMI to its friends, isn’t well understood by the majority of administrators. It appears to be a technology that’s difficult to use and that isn’t well documented, unless you want to go rummaging in the depths of TechNet and MSDN. Is this a fair assessment?

Until PowerShell appeared, this was my stance on WMI. I could make it work, but I didn’t really understand it and certainly didn’t feel I could get the best out of it. Code was difficult to produce and test in VBScript, using WMI interactively required a different set of tools with a cryptic syntax, and background information was very sparse and difficult to find. Now, though, I have the tools to make using it much easier, and I can also use those tools to investigate how WMI is put together. By the end of this chapter, you’ll similarly have a good understanding of the underlying structure of WMI and how all the bits relate, and you’ll know how to make it work for you.

In this chapter, we’ll start by considering what WMI is, and we’ll look at the major components that you need to understand in order to use it:

  • Providers
  • Namespaces
  • Classes

3.1. The structure of WMI

3.2. Methods and properties

3.3. Documenting WMI

3.4. WMI cmdlets and accelerators

3.5. Using WQL

3.6. WMI references and associators

3.7. WMI events

3.8. Summary

sitemap