Create Custom Hardware Inventory and Report for SCCM Task sequence Pre-cache Content – Part 2

Create Custom Hardware Inventory Report for SCCM Task Sequence Pre-cache Content – Part 2. In post 1, we discussed the SCCM Task sequence Pre-cache content Feature.

The major challenge with this feature is reporting. In Enterprise, SCCM admins should know which computers have content pre-cached.

Currently, there is no SCCM native feature to find the pre-cache status. We will review the custom inventory configurations required to get Pre-Cached content details from SCCM clients.

This post provides all the details of the Create Custom Hardware Inventory and Report for SCCM Task sequence Pre-cache Content—Part 2.

Patch My PC

Create Custom Hardware Inventory and Report for SCCM Task Sequence Pre-cache Content – Part 2

The following 2 high levels steps are required to achieve pre-cache status reporting. We will cover each one in detail.

  • Import Custom MOF (download MOF) to collect Client Cache information
  • Customize SQL queries to get reporting as per the need (Download RDL file)

How to Import Custom MOF to Get Client Cache Information

You can use the community tool to create custom hardware inventory MOF files. The custom inventory tool is called RegKeyToMof. The latest version can be downloaded from here. The RegKeyToMof tool allows you to inventory registry keys on a device and return the data back to SCCM using hardware inventory.

Check “Enable 64bits” to ask Inventory in 64bits hive

Check “Dynamic Instances” to query all subkeys below a selection

Uncheck keys in the right-hand treeview to exclude them from the report

Create Custom Hardware Inventory and Report for SCCM Task sequence Pre-cache Content - Part 2 - Fig.1
Create Custom Hardware Inventory and Report for SCCM Task sequence Pre-cache Content – Part 2 – Fig.1
  1. How to Configure SCCM Task Sequence Pre-Cache Content
  2. Reporting of SCCM Task Sequence Pre-Cache Content

Now, head over to the SCCM admin console to import custom hardware inventory-related MOF files. The table below provides more details.

Steps
Launch* SCCM console, click Administration (*Thank you, Joel, for the comment)
In the Administration workspace, click Client Settings
Select Default Client Settings
On the Home tab, click Properties
Create Custom Hardware Inventory and Report for SCCM Task sequence Pre-cache Content – Part 2 – Table 1
Create Custom Hardware Inventory and Report for SCCM Task sequence Pre-cache Content - Part 2 - Fig.2
Create Custom Hardware Inventory and Report for SCCM Task sequence Pre-cache Content – Part 2 – Fig.2

Select hardware inventory and click on Set Classes.

Create Custom Hardware Inventory and Report for SCCM Task sequence Pre-cache Content - Part 2 - Fig.3
Create Custom Hardware Inventory and Report for SCCM Task sequence Pre-cache Content – Part 2 – Fig.3

Click on Import and Open the MOF file. You can download it from GitHub.

Create Custom Hardware Inventory and Report for SCCM Task sequence Pre-cache Content - Part 2 - Fig.4
Create Custom Hardware Inventory and Report for SCCM Task sequence Pre-cache Content – Part 2 – Fig.4

Click on Import. This MOF will add the “CacheInfoEx” inventory class.

Create Custom Hardware Inventory and Report for SCCM Task sequence Pre-cache Content - Part 2 - Fig.5
Create Custom Hardware Inventory and Report for SCCM Task sequence Pre-cache Content – Part 2 – Fig.5

Select CacheInfoEx inventory class as shown below and click ok.

Create Custom Hardware Inventory and Report for SCCM Task sequence Pre-cache Content - Part 2 - Fig.6
Create Custom Hardware Inventory and Report for SCCM Task sequence Pre-cache Content – Part 2 – Fig.6

Note: You may unselect the CacheInfoEx class in the default client agent setting in production. Instead, I suggest creating a new custom agent setting and selecting the CacheInfoEx class.

The SCCM client collects cache information during the next hardware inventory cycle. You can verify this from inventoryagent.log.

Collection: Namespace = \\.\root\cimv2; Query = SELECT __CLASS, __PATH, __RELPATH, BootDevice, BuildNumber, Caption, CountryCode, CSDVersion, Description, InstallDate, LastBootUpTime, Locale, Manufacturer, Name, Organization, OSLanguage, ProductType, RegisteredUser, SystemDirectory, TotalSwapSpaceSize, TotalVirtualMemorySize, TotalVisibleMemorySize, Version, WindowsDirectory FROM Win32_OperatingSystem; Timeout = 600 secs.
Create Custom Hardware Inventory and Report for SCCM Task sequence Pre-cache Content - Part 2 - Fig.7
Create Custom Hardware Inventory and Report for SCCM Task sequence Pre-cache Content – Part 2 – Fig.7

Inventory is processed by the SCCM server and committed to the database. You can verify dataldr.log to confirm.

  • Begin transaction:Machine= CM1(GUID:ADA4429B-7817-41345-BECE-CFE15556DA22)
  • Commit transaction:Machine= CMl(GUID:ADA44298-7817-41345-BECI3-C FE16556DA22)
  • Done Machine=CM1(GUID:ADA44298-7817-4845-BEC8-CFE16556DA22) code=0 Done blocking until completion.
  • No more machine MIFs to be processed, terminating thread
  • Shutting down Machine Writer
  • Worker thread 5204 halting execution
  • I finished processing 1 MIFs
Create Custom Hardware Inventory and Report for SCCM Task sequence Pre-cache Content - Part 2 - Fig.8
Create Custom Hardware Inventory and Report for SCCM Task sequence Pre-cache Content – Part 2 – Fig.8

Result for SCCM Administrator

New SQL view “v_GS_CACHEINFOEX” gets created with the below attributes. These values help to customize SQL queries as per our requirement to check the pre-caching details.

Create Custom Hardware Inventory and Report for SCCM Task sequence Pre-cache Content - Part 2 - Fig.9
Create Custom Hardware Inventory and Report for SCCM Task sequence Pre-cache Content – Part 2 – Fig.9

The below SQL query gives the cached content status for all clients in a specific collection. Modify the collection ID. You can get the collection query Download-RDL-file-SSRS-report-for-Task-sequence-Pre-Cache-status/README.md at main · AnoopCNair/Download-RDL-file-SSRS-report-for-Task-sequence-Pre-Cache-status (github.com)

Create Custom Hardware Inventory and Report for SCCM Task sequence Pre-cache Content - Part 2 - Fig.10
Create Custom Hardware Inventory and Report for SCCM Task sequence Pre-cache Content – Part 2 – Fig.10

We can further customize the SQL query to get the pre-cache information specific to the task sequence and collection. The RDL file for the report below is available to download from GitHub.

You can import the RDL to get a report, as shown below. The total content size will help you determine whether all contents referred to in the Task sequence are cached.

Create Custom Hardware Inventory and Report for SCCM Task sequence Pre-cache Content - Part 2 - Fig.11
Create Custom Hardware Inventory and Report for SCCM Task sequence Pre-cache Content – Part 2 – Fig.11

We are on WhatsApp now. To get the latest step-by-step guides, news, and updates, Join our Channel. Click here. HTMD WhatsApp.

Author

Vimal has more than 10 years of experience in SCCM device management solutions. His main focus is on Device Management technologies like Microsoft Intune, ConfigMgr (SCCM), OS Deployment, and Patch Management. He writes about SCCM, Windows 10, Microsoft Intune, and MDT.

23 thoughts on “Create Custom Hardware Inventory and Report for SCCM Task sequence Pre-cache Content – Part 2”

  1. Hi Anoop, how are you pal….
    one question on this…I may be wrong though…!

    do you think this class “CacheInfoEx” is already present in system’s WMI, don’t you think we have to enable this class somehow on computers so that it can be picked up by SCCM in the H/W inventory cycle….?

    Reply
  2. Hi,
    Looking to see if i can get some input here. Extended the Inventory using the MOF, data shows in Primary (can see both views and tables) but no data in CAS. Replication is working fine, however no trace of why the data doesnt show up on CAS – every other inventory data does.
    Running this query on CAS or PRI doesnt bring up the articlid either-
    Select * from ArticleId where Replication ID in (select ID from vReplicationData where Replicationgroup like ‘Hardware_Inventory%’)

    Any clues?

    Reply
  3. I have downloaded the RDL and Uploaded, but am getting the below error
    The report server cannot process the report or shared dataset. The shared data source ‘AutoGen__5C6358F2_4BB6_4a1b_A16E_8D96795D8602_’ for the report server or SharePoint site is not valid. Browse to the server or site and select a shared data source. (rsInvalidDataSourceReference)

    Reply
  4. Awesome article thank you for taking time to share your knowledge with us all.

    I noticed, CTRL + F “Lunch SCCM Console.” – it’s ok just give me a signed TShirt.

    Reply
    • Hi Anoop – Can you please check the content on Github for the mof and rdl file? They both appear to have changed to some generic html file. Thanks.

      Reply
  5. I get the error:

    “The following classes for which you are trying to import settings do not exist. Import the required class definitions and then try to import the settings again.” CacheInfoEx

    How do I add?

    Reply
  6. attempting to use this in SCCM 1910 and receive the error in dataldr.log:

    CGroup::AddGroup – WARNING: Could not find group MICROSOFT|CACHEINFOEX|1.0 in the group map, this group in the inventory report will be ignored.

    and the SQL view is not being created.

    Reply
  7. Hi Anoop – Can you please check the content on Github for the mof and rdl file? They both appear to have changed to some generic html file. Thanks.

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.