WMI and .NET Framework Schema

The term "namespace" is used by both WMI and .NET Framework but refers to different entities. A WMI namespace is a subdivision of the WMI repository, also known as the CIM repository. The most frequently encountered WMI namespace is root\cimv2, where the huge set of Win32 classes is stored. This documentation refers to these namespaces as WMI namespaces.

A namespace in .NET Framework is the mechanism for limiting the scope of a class name so that it is only defined within a specified namespace. System.Management and System.Management.Instrumentation are namespaces within the larger .NET Framework Class Library. This documentation refers to these namespaces as .NET Framework namespaces.

WMI Classes

WMI uses the object-oriented concept of a class to model computer system components. Instances of the preinstalled WMI classes, such as Win32_Process or Win32_Processor, represent entities in a network, computer system, or operating system. Several built-in providers define and supply live data for the classes with names that begin with "Win32_". One subset of the Win32 classes, Win32_PerfRawData classes and Win32_PerfFormattedData classes, provide the same live performance data as the System Monitor tool. For more information, see "Win32 Classes" in the Windows Management Instrumentation documentation in the MSDN Library at https://msdn.microsoft.com/library. The performance counter provider and the cooked counter provider supply data to the instances of these classes. Another subset of WMI classes, one example being Win32_Volume, is supplied by the storage volume provider. Other build-in providers, such as the policy provider supplies preinstalled classes with other names, such as MSFT_Providers. For more information, see "WMI Providers" in the Windows Management Instrumentation documentation in the MSDN Library at https://msdn.microsoft.com/library.

The classes include properties that describe data, and methods to describe and control the behavior of an application or device. You can always add new classes to represent new managed objects in an existing environment. For more information, see "Extending Your Management Capabilities" in the Windows Management Instrumentation documentation in the MSDN Library at https://msdn.microsoft.com/library.

Inheritance is a powerful tool in WMI classes. You do not have to construct classes from the ground up because you can often derive your classes from existing CIM or WMI classes. For more information, see Event Inheritance for Classes Derived from BaseEvent.

When exposing information through WMI, a good class structure is critical to enable tools to manage your application.

The WMI classes are self-describing. You can programmatically discover what properties and methods a class provides.

WMI allows you to define associations, or linkages, between classes. These associations can represent relationships between specific instances of the linked classes. Management applications can traverse such association relationships through methods and queries such as the RelatedObjectQuery or RelationshipQuery queries. You can also define association classes for their management environment. For more information, see "Declaring an Association Class" in the Windows Management Instrumentation documentation in the MSDN Library at https://msdn.microsoft.com/library.

See Also

Concepts

More Information about WMI .NET

Send comments about this topic to Microsoft.

Copyright © 2007 by Microsoft Corporation. All rights reserved.