The other day, a friend, emailed me to ask, if I had an article that show you how to clean up Custom Inventory within SCCM. I said that I didn’t but I would try to write an article on How to Clean Up Custom Inventory over the weekend.
As a Microsoft Configuration Manager (MEMCM / MECM / SCCM / ConfigMgr / MCM) administrator Extending the ConfigMgr Inventory is something we all do. But one of the questions we will get from Change Advisory Board (CAB) or management is How can we clean up these changes when they are not long needed?
This process isn’t that difficult but it will depend on if you are cleaning up a strait WMI class or one that includes an edit to configuration.mof file. For this example, I will show the harder one which has a configuration.mof edit. I will user the one I created for my article called “How to Calculate DB Size of a Inventory”.
How to Clean Up Custom Inventory
There are two steps in cleaning up an Custom inventory when there is an configuration.mof edit. Those steps are:
- Removed the Client Setting within Hardware Inventory
- Remove the Edits within the Configuration.mof file
Although you can do these is any order, to reduce the headache, do them the order listed above. This will reduce any errors that might occur.
Client Setting within Hardware Inventory
There are no really trick here. Open Default Client Settings, select Hardware Inventory node. Then click Set Classes….
Locate and select the Custom Hardware Inventory Class. Then click the delete button.
If this was just a normal WMI class that you imported, this is all you need to do. ConfigMgr will clean up the rest.
Edits within the Configuration.mof file
This too is not all that difficult; all you need to do is open the Configuration.mof file. Remove the edits in question and save the file. At this point, SCCM will take over and removed all of the “commands” to add this WMI class on each computer. You can see this within the dataldr.log. Then when each computer next checks in to the management point they will no longer report these details back to ConfigMgr.
What about the SQL Views and the data?
This will get cleaned up automatically by ConfigMgr. This mean SCCM will delete the views, data and tables, alone with any store procedures that it created. There is nothing you really need to do.
You can confirm that the data and SQL views are cleaned up by reviewing he dataldr.log
How to Clean Up Custom Inventory Video
Below is the video that I show the whole process.
What else would you like to know about ConfigMgr Custom Inventory? Since I will be putting out a lot more videos on YouTube. Don’t forget to subscribe and click the like button. I will help bring the videos to admins like you.
Finally, don’t forget that you can subscribe to my RRS feed to stay on top of the latest trips and tricks. Additionally, If you have any questions, please feel free to touch base @Garthmj.