Using WMI objects
When you leverage PowerShell to interact with WMI, you are interacting with WMI namespaces and WMI classes. WMI namespaces are collections of classes that represent management of a particular system. The Windows operating system, for example, uses the default root\cimv2 namespace, and that collection contains over a thousand classes. Classes have multiple attributes such as properties and methods. Class properties represent information about that particular class, which is typically represented by a string or a numeric format. Methods are more like actions, which allow you to interact with that object, or other objects on a system.
The two primary cmdlets that allow you to retrieve a WMI object on a system are get-wmiobject and ...
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