O R G A N I C / F E R T I L I Z E R: inventory sms advanced client component configuration...

Apr 3, 2008

inventory sms advanced client component configuration...

i've read numerous sources about how to disable components of the sms advanced client.  now trying to find which clients have that setting off was another mystery all together.  alas, not totally hidden.  it's exposed in root\ccm\policy\machine\actualconfig.

by the way, did you know you can turn off the inventory agent?  i'm not sure what kind of usefulness could derive from that, but it's there.  if you've turned off the inventory agent, good luck.  this won't help you.  :) 

this is going to require a sms_def.mof change.  fortunately, it doesn't require a client compile so wipe that sweat off your brow and keep reading.

 

i found two ways to do this.  one is what i refer to as the long way (which i was doing when i was trying to figure out how everything worked.)  the other, i will refer to as the short way.  obviously (and just like in real life), the short way is always better.  so first, i present to you ... the short way!

//  *Software Distribution
    #pragma namespace ("\\\\.\\root\\cimv2\\sms")

    [SMS_Report     (TRUE),
    SMS_Group_Name ("SMS Advanced Client Config"),
    Namespace      ("root\\\\ccm\\\\policy\\\\machine\\\\actualconfig"),
    SMS_Class_ID   ("MCO|SMS_CLIENT_CONFIG|1.0") ]

    class CCM_ComponentClientConfig : SMS_Class_Template

    {
    [SMS_Report (TRUE),key  ]    string   ComponentName;
    [SMS_Report (TRUE)      ]    boolean  Enabled;
    };

 

for my environment, componentname and enabled were the only two fields i needed.  it's for this reason that i can utilize the short way approach.  you see, in the short way, i'm drawing from the single class "ccm_componentclientconfig".  (this appears to be some combined class of all the other configuration classes.)  behind the scenes, we're actually performing a wmi query that would look like this:

select componentname, enabled from ccm_componentclientconfig

 

clear?  okay, moving on.  if i wanted to extract other columns from all 5 of the component configuration classes, they would have to match each other or the query would fail.  for instance, one like this would bomb out since cachecontenttimeout only exists in ccm_softwaredistributionclientconfig :

select componentname, enabled, cachecontenttimeout from ccm_componentclientconfig

 

because of this limitation, if you want to draw additional items out, you should consider using the mof below.  note that in the long way mof, the class utilized for each section is different.  i just happened to stumble upon the one up above, otherwise, this is the way i would have gone...

and now, the completely exaggerated, only really, slightly longer (4x as many queries that execute client side though but who cares, ho hum) the long way!

// *Software Distribution #pragma namespace ("\\\\.\\root\\cimv2\\sms") [SMS_Report (TRUE), SMS_Group_Name ("SMS Advanced Client Config"), Namespace ("root\\\\ccm\\\\policy\\\\machine\\\\actualconfig"), SMS_Class_ID ("MCO|SMS_CLIENT_CONFIG|1.0") ] class CCM_SoftwareDistributionClientConfig : SMS_Class_Template { [SMS_Report (TRUE),key ] string ComponentName; [SMS_Report (TRUE) ] boolean Enabled;

[SMS_Report (TRUE)      ]    uint32   CacheContentTimeout;

}; // *Software Metering [SMS_Report (TRUE), SMS_Group_Name ("SMS Advanced Client Config"), Namespace ("root\\\\ccm\\\\policy\\\\machine\\\\actualconfig"), SMS_Class_ID ("MCO|SMS_CLIENT_CONFIG|1.0") ] class CCM_SoftwareMeteringClientConfig : SMS_Class_Template { [SMS_Report (TRUE),key ] string ComponentName; [SMS_Report (TRUE) ] boolean Enabled; }; // *Inventory [SMS_Report (TRUE), SMS_Group_Name ("SMS Advanced Client Config"), Namespace ("root\\\\ccm\\\\policy\\\\machine\\\\actualconfig"), SMS_Class_ID ("MCO|SMS_CLIENT_CONFIG|1.0") ] class CCM_InventoryClientConfig : SMS_Class_Template { [SMS_Report (TRUE),key ] string ComponentName; [SMS_Report (TRUE) ] boolean Enabled; }; // *Remote Tools [SMS_Report (TRUE), SMS_Group_Name ("SMS Advanced Client Config"), Namespace ("root\\\\ccm\\\\policy\\\\machine\\\\actualconfig"), SMS_Class_ID ("MCO|SMS_CLIENT_CONFIG|1.0") ] class CCM_RemoteToolsConfig : SMS_Class_Template { [SMS_Report (TRUE),key ] string ComponentName; [SMS_Report (TRUE) ] boolean Enabled; };

 

notice that the group name and class id stays consistent?  because of that, it flows into the same table.  now look carefully at the section pertaining to CCM_SoftwareDistributionClientConfig.  notice how it has an additional reporting field called "cachecontenttimeout"?  because of this, you'll see additional columns in the output for all the fields.  who cares.  at least you got the data... and in one location!

screenshots below should explain all the mumbling i've been doing.  first, the short way:

image

and once again, the long way.  make note of the column "cachecontenttimeout".

image

and that is that.