Accessing WMI from Scripts
Throughout this chapter, we have referred to “management applications or scripts” as potential users of WMI. In practice, however, this book is not about writing—or using—management applications but about scripting. The goal is to arm administrators of Windows-based networks with the knowledge required to automate management tasks by scripting WMI. It seems appropriate, therefore, to briefly consider how a script can interact with WMI.
WMI provides a scripting API, a small set of functions that can be accessed from a scripting language that can be used to find, create, and manipulate WMI objects and classes. These functions include facilities for obtaining object references using object paths or WQL and others for ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access