The managed SMS Provider library is a .NET Framework library that wraps the System.Management classes and provides a System Center 2012 Configuration Manager-centric object model. It also provides a wrapper for accessing the Configuration Manager site control file.
The library can be used outside of any code relating to the Configuration Manager console .NET Framework library, but is built on the same underlying architecture.
For information about using managed code with the System Center 2012 Configuration Manager client, see About Configuration Manager WMI Programming.
Configuration Manager Classes and Interfaces
The primary classes and interfaces for use with the managed SMS Provider are the following:
The class WqlConnectionManager provides access to the Configuration Manager Windows Management Instrumentation (WMI) provider.
It is an implementation of the abstract base class ConnectionManagerBase that defines connections throughout the managed System Center 2012 Configuration Manager libraries.
It is used to connect to the SMS Provider and query, or create, System Center 2012 Configuration Manager object instances. The following tasks demonstrate the basic usage of WqlConnectionManager.
IResultObject is an interface that all result sets and objects expose. Through it, you can read, modify, delete, call methods on, and otherwise manipulate Configuration Manager objects. You typically get an IResultObject whenever you create an object or as a result of a query.
The following tasks demonstrate the basic use of IResultObject:
QueryProcesor provides support for both synchronous and asynchronous queries against the SMS Provider. In asynchronous queries, SmsBackgroundWorker is used to provide thread support query results. The following tasks demonstrate queries:
IQueryPropertyItem is a single property of the result object, supports data binding and get/set properties.
The following tasks demonstrate the use of IQueryPropertyItem:
The assemblies that are required for using managed SMS Provider are:
The WMI implementation of the managed Configuration Manager libraries is provided by adminui.wqlqueryengine.