I am trying to collect information about Sqlserver instances within WMI.  I was 
able to add this class in hardware inventory, but the location of this 
information can differ depending on the version of SQL installed.  Is there an 
easier way to be able to retrieve this without having to have multiple 
Namespace locations?

The Class ID seems to be the same but the namespace will vary.

Below is a snip it from the exported mof from SCCM 2012 on this namespace.  The 
highlighted part is what could be different depending on sql.


[ SMS_Report (TRUE),
  SMS_Group_Name ("SqlServiceAdvancedProperty"),
  SMS_Class_ID ("MICROSOFT|SQLSERVICEADVANCEDPROPERTY|1.0"),
  Namespace ("root\\\\Microsoft\\\\SqlServer\\\\ComputerManagement11") ]
class SqlServiceAdvancedProperty : SMS_Class_Template
{
    [ SMS_Report (TRUE), key ]
    UInt32     PropertyIndex;
    [ SMS_Report (TRUE), key ]
    String     PropertyName;
    [ SMS_Report (TRUE), key ]
    String     ServiceName;
    [ SMS_Report (TRUE), key ]
    UInt32     SqlServiceType;
    [ SMS_Report (TRUE) ]
    Boolean     IsReadOnly;
    [ SMS_Report (TRUE) ]
    UInt32     PropertyNumValue;
    [ SMS_Report (TRUE) ]
    String     PropertyStrValue;
    [ SMS_Report (TRUE) ]
    UInt32     PropertyValueType;
};



Reply via email to