Querying and Updating the WMI Repository

05/30/2009

You can use Windows Management Instrumentation (WMI) to view and update a running application's configuration data when you use the Manageable Configuration Source to expose your Enterprise Library configuration. The Manageable Configuration Source reads information from the configuration file, applies any applicable Group Policy overrides, and exposes the configuration information to applications as a series of configuration class instances in the same way as the other Enterprise Library configuration sources.

However, the Manageable Configuration Source also exposes the configuration information through the .NET WMI 2.0 API and to the WMI Repository as a set of WMI classes that you can query and view. This allows administrators and users to examine configuration information using standard Windows-based management tools or code.

In addition, administrators and users can update the values of the WMI objects using standard Windows-based management tools or code. These changes update the configuration information exposed to the application by the Manageable Configuration Source, which also raises a ConfigurationChanged event that allows the application to react to the changes and reload the new configuration values.

Note:
You must have the relevant Windows permissions to update WMI objects. In addition, as changes pass back to the Manageable Configuration Source, it reapplies any relevant Group Policy overrides. If the change conflicts with a Group Policy setting, the Manageable Configuration Source will ignore the change and continue to expose the Group Policy-applied value.

Changes you make to the configuration exposed by the WMI objects are exposed by the Manageable Configuration Source and are visible in the application. However, they do not change the contents of the original configuration file. When the application restarts, or if you make changes to the configuration file contents, any updates made through WMI are lost. 

The following table lists the ways you can query and update values in the WMI Repository.

Posted in: .Net Programming| Tags: Application Configuration Enterprise Library Group Manageable Policy Query Repository Source Update WMI file information management

Hot Posts

Latest posts

Tags

Others

Sponsors