question

NicolaGenerali-3722 avatar image
0 Votes"
NicolaGenerali-3722 asked SherryKissinger-ECM answered

Extend Hardware Inventory - add new WMI class registry key

Good morning
We are trying to extend hardware inventory via client settings
In our environment we have Configuration Manager CB 2107
WE are trying to extend Hardware Inventory via client settings
WE added the code below to configuration.mof

pragma namespace ("\\\.\\root\\cimv2")

pragma deleteclass("CurrentVersion", NOFAIL)

[DYNPROPS]
Class CurrentVersion
{
[key] string KeyName;
Uint32 UBR;
};

[DYNPROPS]
Instance of CurrentVersion
{
KeyName="OperatingSystemUBR";
[PropertyContext("Local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion|UBR"),Dynamic,Provider("RegPropProv")] UBR;

Added the class to client configuration

[ SMS_Report (TRUE),
SMS_Group_Name ("OperatingSystemUBR"),
SMS_Class_ID ("MICROSOFT|OPERATINGSYSTEMUBR|1.0"),
Namespace ("root\\\\cimv2") ]
class OperatingSystemUBR : SMS_Class_Template
{
[ SMS_Report (TRUE), key ]
String KeyName;
[ SMS_Report (TRUE) ]
UInt32 UBR;
};

The device with correct hardware inventory is the reference computer (for testing). It seems that the configuration.mof wont replicate correctly.
The view within the DB is correctly formatted. There is only one row indeed.
Everything seems to work fine but the inventory. The inventory log file process the information correctly
Is there another step we are missing?
Thanks for the reply

mem-cm-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SherryKissinger-ECM avatar image
0 Votes"
SherryKissinger-ECM answered

This isn't an answer, more of a workaround. Although I understand the wish to have the marketing version right in CM... for many reports I just do this:

Select
Case
when sys1.Build01 = '10.0.19042' then '20H2'
when sys1.Build01 = '10.0.18363' then '1909'
else sys1.Build01 + ': Look It Up and Add another line for this version in your sql query'
End as "MarketingVersion'
from v_r_system sys1
Where build01 is not null

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Garth avatar image
0 Votes"
Garth answered

What do you mean by the configuration.mof will not replicate? If you have one computer with inventory then it is working, what have you done to troubleshoot this?
How often are you performing hw inventory?

Read these two blogs https://www.recastsoftware.com/resources/how-to-confirm-that-hardware-inventory-is-working/
https://www.recastsoftware.com/resources/updated-troubleshoot-configmgr-hardware-inventory-issues/

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AllenLiu-MSFT avatar image
0 Votes"
AllenLiu-MSFT answered AllenLiu-MSFT edited

Hi, @NicolaGenerali-3722
Thank you for posting in Microsoft Q&A forum.

I have followed the steps of below article and got a success.
1.I copy the configuration.mof file from site server and paste it on test machine. At the end of the file paste our script for hardware extension and save as it is to the test machine.
2.Once copied Execute following Command on test machine: mofcomp.exe configuration.mof
3.Then open Inventory Client setting and add the class.
4.Once done run machine policy and inventory policies on test machine to get the inventory result.
5.Once completed, configuration.mof can be replaced with new one so all the machines will receive updated mof and will have inventory extended.

For more details, you may refer to:
https://corecds.wordpress.com/2018/02/18/135/
(Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.)


If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.