Leveraging WMI Scripting: Using Windows Management Instrumentation to Solve Windows Management Problems

Until now, each time we worked with a WMI provider, it collected information about a specific managed object in a computer. WMI also comes with a collection of providers designed to support some WMI internal features. In this section, we will examine the two most useful features from a WMI consumer perspective: the View provider to support the concept of views and the Forwarding consumer provider to perform events forwarding. We will also briefly examine the event Correlator providers.
The main capability of the View provider is its ability to take properties from different source classes, different namespaces, and different computers and combine all information in one single class. Basically, the concept of the View provider looks very similar to the concept of views developed for the relational database. Of course, this comparison must be limited here, since its implementation is totally different. To take advantage of the View provider, it must first be registered in the CIM repository. The registration can be done with the MOFCOMP.EXE tool and the MOF file shown in Sample 3.82.
1:#pragma namespace("\\\\.\\Root") 2: 3:Instance of __Namespace 4:{ 5: Name = "View"; 6:}; 7: 8:#pragma namespace("\\\\.\\ROOT\\View") 9:10:Instance of __Win32Provider as $DataProv11:{12: Name = "MS_VIEW_INSTANCE_PROVIDER";13: ClsId = "{AA70DDF4-E11C-11D1-ABB0-00C04FD9159E}";14: ImpersonationLevel = 1;15: PerUserInitialization = "True";16: HostingModel = "NetworkServiceHost";17:};18:19:Instance of __InstanceProviderRegistration20:{21: Provider = $DataProv;22: SupportsPut = TRUE;23: SupportsGet = TRUE;24:...