you did all what is required. so when you deselect and import the MOF file,did
it went through ? you say,you can see 3 values that you imported into client
settings ?what does the dataldr.log says when you imported the MOF File ?can
you try the importing the attached MOF file to inventory ? (remove .txt
extension)
RegardsEswar Koneti
www.eskonr.com
From: [email protected]
To: [email protected]
Subject: [mssms] Querying Custom Registry Values
Date: Wed, 25 Mar 2015 01:52:32 +0000
I am new to System Center and was hoping to get some help from the community to
query custom registry values. If this is the not the right area for this,
please let me know.
Problem
I get an error telling me that “The MOF file you tried to import could not be
compiled. Ensure that the MOF file contains valid data. You can use the command
line mofcomp utility to test the data.” when importing
a .mof file produced by RegKeyToMOF.
Setup
System Center 2012 R2 Configuration Manager on Server 2012r2
RegKeyToMOF v3.1 July 12 (this appeared to be the recommended tool to help
build the mof files based on some reading, but if there is another tool to use,
please let me know)
Goal
I would like to view the SNMP
PermittedManagers key at
HKLM\SYSTEM\CurrentControlSet\services\SNMP\Parameters\PermittedManagers for
any values that exist for each device.
Steps Taken
1.
I ran RegKeyToMOF and pointed to the registry key above.
2.
Copied and pasted the code from the
configuration.mof tab under ConfMgr12 tab into D:\Program Files\Microsoft
Configuration Manager\inboxes\clifiles.src\hinv\configuration.mof and then
saved it (I have included the code in
configuration.mof append.txt).
3.
Went into the Set Classes import area and attempted to import
SNMP-PermittedManagers.mof (attached), but this failed with:
“The MOF file you tried to import could not be compiled. Ensure that the MOF
file contains valid data. You can use the command line mofcomp utility to test
the data.”.
Troubleshooting Steps
1.
I repeated the steps several times using the steps listed at:
http://be.enhansoft.com/post/2014/02/13/How-to-Use-RegKeyToMof.aspx
http://it.peikkoluola.net/2013/06/20/extend-sccm-client-hardware-inventory-with-a-custom-attribute-value
2.
I attempted to de-select “Enable 64bits (forRegkeys not written in
Wow6432Node)” and reimported the data.
3.
I tried to restart the SCCM console after appending the data to
configuration.mof.
4.
Checked that the SCCM server (which is where I am importing this .mof file
from) has these registry key and 3 values.
5.
Ran SCCM console as admin.
6.
Ran mofcomp as suggested in the error message and got “error SYNTAX 0x8004400c:
Expected property or method name” on line 13. However, I am not sure what the
problem with line 13. Line 13 in the
.mof file reads:
[SMS_Report(TRUE)] String 1;
Any help would be appreciated.
Thanks,
-Aakash Shah
// RegKeyToMOF by Mark Cochrane (thanks to Skissinger, Steverac, Jonas Hettich
& Kent Agerlund)
// this section tells the inventory agent what to report to the server
// 25/3/2015 12:02:23 PM
#pragma namespace ("\\\\.\\root\\cimv2\\SMS")
#pragma deleteclass("PermittedManagers", NOFAIL)
[SMS_Report(TRUE),SMS_Group_Name("PermittedManagers"),SMS_Class_ID("PermittedManagers")]
Class PermittedManagers: SMS_Class_Template
{
[SMS_Report(TRUE),key] string KeyName;
[SMS_Report(TRUE)] String String1;
[SMS_Report(TRUE)] String String2;
[SMS_Report(TRUE)] String 3;
};