WMI on Configuration Manager Servers
The SMS provider is a WMI
provider that exposes many of the most important objects in the
Configuration Manager site database as WMI managed objects. This
provider is generally installed on either the site server or the site
database server.
The ConfigMgr console and auxiliary applications such as the Resource
Explorer, Service Manager, and various ConfigMgr tools are implemented
as WMI management applications.
As with other WMI providers, you can also take advantage of the SMS
provider’s objects in custom scripts or other management applications.
The provider also implements the Configuration Manager object security
model.
The SMS provider namespace is Root\SMS\site_<Site Code>.
You can use standard WMI tools to view ConfigMgr classes and objects.
You can also view the properties of SMS provider objects from within the
ConfigMgr console. To enable viewing of WMI information, navigate to
the AdminUI\bin folder under the main ConfigMgr installation folder and
start the console with either or both of the following command-line
options:
AdminConsole.msc /SMS:NamespaceView=1—
This adds a ConfigMgr Namespace node to the console tree. The Namespace
node displays a list of WMI classes in the ConfigMgr namespace. You can
click a class name, as shown in Figure 24,
to display its properties, qualifiers, and methods in the details pane.
You can also select a property to see its associated list of property
qualifiers.
AdminConsole.msc /SMS:DebugView=1—
This allows you to view object properties as raw WMI data. With Debug
view enabled, you can right-click an object in the console tree and
choose ConfigMgr Object Properties View to display the WMI properties.
Notice that the default console view essentially presents the same
information in a Windows dialog box. Figure 25 shows the WMI properties of the DAL ConfigMgr site.
Figure 3.32 displayed the property qualifiers of the Status property, showing that the status value “1” means ACTIVE.
Using the console WMI
views makes exploring the SMS provider namespace much easier. To
illustrate how to drill down into the underlying WMI from the console,
this section uses ConfigMgr collections as an example. To explore the WMI behind ConfigMgr collections, perform the following steps:
1. | Enter the following command line to open the console with both the Namespace and Debug views enabled:
AdminConsole.msc /SMS:DebugView=1 /SMS:NamespaceView=1
|
2. | Navigate to System Center Configuration Manager -> Site Database -> Computer Management -> Collections.
|
3. | Right-click the Collections node, and then choose the ConfigMgr Object Properties View. Figure 26 displays some of the WMI properties of the collection instances.
The RelPath
property in column 1 provides the class name, SMS_Collection, and the
name of each instance. You can use this information to locate the class
and instances in CIM Studio of the WMI Object Browser. This is
especially useful for those classes with names not easily guessed, such
as the SMS_SIIB_Configuration class that represents many site settings. The
MemberClass name of the SMS_Collection instances tells you where to
find additional information about the collection members.
|
4. | The /SMS:NamespaceView=1
command-line switch adds the ConfigMgr Namespace folder to the Console
tree pane. Locate the SMS_Collection class under the ConfigMgr Namespace
node in the console tree pane. As shown in Figure 27, the Namespace view provides a convenient display of class properties, methods, and qualifiers.
|
5. | You can use CIM Studio and the WMI Object Browser to explore the SMS_Collection class and instances further. Figures 28 and 29,
respectively, show the class methods and associations in CIM Studio.
The SMS_Collection class methods allow you to perform operations such as
pushing the ConfigMgr Client to collection members with the Create CCRs
method and updating collection membership with the RequestRefresh
method. When you perform these operations through the ConfigMgr console,
you are actually invoking the methods of the SMS_Collection class.
|
The Smsprov.mof file
contains the MOF language defining the Root\SMS namespace and the
classes it contains. You can find the Smsprov.mof file in the bin\<platform>
folder under the Configuration Manager installation folder. You can
also export MOF definitions for instances of the following ConfigMgr
object types directly from the console:
Collections
Queries
Reports
To export object
definitions to MOF files, right-click the parent node, choose Export
Objects, and complete the wizard to choose the instances to export and
the file location as well as to enter descriptive text. You can use a
similar process to import objects from MOF files.