Quantcast
Channel: Configuration Manager 2007 Inventory forum
Viewing all articles
Browse latest Browse all 233

How to create reports when using custom mof ?

$
0
0

Hello ! I created a registry key (HKLM\SOFTWARE\SCCM\IMAGE) in my base image to keep track of the version of the images we deploy.

I was able to add the registry infos into the sms_def.mof and configuration.mof files by following this procedure.

I am now wondering how can I use the reports to get the data  ???? Where is the new data stored..?

Below are the parts I added into the following files

configuration.mof

#pragma namespace ("\\\\.\\root\\cimv2")
#pragma deleteclass("SCCM_Image", NOFAIL)
[DYNPROPS]
Class SCCM_Image
{
[key] string KeyName;
String SCCM_Image_Version;
String SCCM_TS_Build;
};

[DYNPROPS]
Instance of SCCM_Image
{
KeyName="ImageVersion";
[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\SCCM\\Image|SCCM_Image_Version"),Dynamic,Provider("RegPropProv")] SCCM_Image_Version;
[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\SCCM\\Image|SCCM_TS_Build"),Dynamic,Provider("RegPropProv")] SCCM_TS_Build;
};

#pragma namespace ("\\\\.\\root\\cimv2")
#pragma deleteclass("SCCM_Image_64", NOFAIL)
[DYNPROPS]
Class SCCM_Image_64
{
[key] string KeyName;
String SCCM_Image_Version;
String SCCM_TS_Build;
};

[DYNPROPS]
Instance of SCCM_Image_64
{
KeyName="ImageVersion";
[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\SCCM\\Image|SCCM_Image_Version"),Dynamic,Provider("RegPropProv")] SCCM_Image_Version;
[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\SCCM\\Image|SCCM_TS_Build"),Dynamic,Provider("RegPropProv")] SCCM_TS_Build;
};

sms_def.mof

#pragma namespace ("\\\\.\\root\\cimv2\\SMS")
#pragma deleteclass("SCCM_Image", NOFAIL)

[SMS_Report(TRUE),SMS_Group_Name("SCCM_Image"),SMS_Class_ID("SCCM_Image|SCCM_Image|1.0"),
SMS_Context_1("__ProviderArchitecture=32|uint32"),
SMS_Context_2("__RequiredArchitecture=true|boolean")]

Class SCCM_Image: SMS_Class_Template
{
[SMS_Report(TRUE),key] string KeyName;
[SMS_Report(TRUE)] String SCCM_Image_Version;
[SMS_Report(TRUE)] String SCCM_TS_Build;
};

#pragma namespace ("\\\\.\\root\\cimv2\\SMS")
#pragma deleteclass("SCCM_Image_64", NOFAIL)

[SMS_Report(TRUE),SMS_Group_Name("SCCM_Image"),SMS_Class_ID("SCCM_Image|SCCM_Image|1.0"),
SMS_Context_1("__ProviderArchitecture=64|uint32"),
SMS_Context_2("__RequiredArchitecture=true|boolean")]

Class SCCM_Image_64 : SMS_Class_Template
{
[SMS_Report(TRUE),key] string KeyName;
[SMS_Report(TRUE)] String SCCM_Image_Version;
[SMS_Report(TRUE)] String SCCM_TS_Build;
};



Viewing all articles
Browse latest Browse all 233

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>