Reporting SCCM Task sequence Pre-cache Content – Part 2

Reporting SCCM Task sequence Pre-cache Content – Part 2. In post 1, we discussed SCCM Task sequence Pre-cache content Feature. The major challenge with this feature is reporting. In Enterprise, SCCM admins should know which computers have contents Pre-cached. Currently, there is no SCCM native feature to find the pre-cache status. We will go through the custom inventory configurations required to get Pre-Cached content details from SCCM clients.

This is a series of posts as listed below:

  1. How to Configure SCCM Task sequence Pre-Cache Content Part 1
  2. Reporting of SCCM Task sequence Pre-Cache Content – Part 2

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

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

How to import Custom MOF to get Client Cache information

  • 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
Default Client agent Settings
Default SCCM Client agent Settings
  • Select hardware inventory and click on Set Classes
hardware inventory
SCCM client agent setting hardware inventory
  • Click on Import
  • Open the MOF file. You can download it from the TechNet gallery.
custom MOF
custom MOF import
  • Click on Import. This MOF will add “CacheInfoEx” inventory class
  • Select CacheInfoEx inventory class as shown below and click ok

Note: In production, you may unselect CacheInfoEx class in default client agent setting. Instead I would suggest creating a new custom agent setting and select CacheInfoEx class.

  • On next hardware inventory cycle, SCCM client collects cache information. 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.
  • Inventory is processed by SCCM server and committed to 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
Finished processing 1 MIFs
dataldr sccm inventory

 Result for SCCM Administrator

  • New SQL view “v_GS_CACHEINFOEX” gets created with below attributes. These values help to customize SQL query as per our requirement to check the pre-caching details.
Reporting SCCM Task sequence Pre-cache Content - Part 2 1
  • Below SQL query gives the cached content status for all clients in a specific collection. Modify the collection ID.
SELECT   aa.Netbios_Name0,bb.ContentId0,bb.ContentSize0,bb.Location0 from v_R_System aa left join v_GS_CACHEINFOEX bb on aa.ResourceID=bb.ResourceID join
v_FullCollectionMembership cc on bb.ResourceID in (Select cc.ResourceID from v_FullCollectionMembership where cc.CollectionID ='CHQ00017')
Reporting SCCM Task sequence Pre-cache Content - Part 2 2
  • We can further customize the SQL query to get the pre-cache information specific to Task sequence and collection. RDL file for the below report is available to download from TechNet gallery. You can import the RDL to get a report as shown below. Also, the total content size will help you to know whether all contents referred to in the Task sequence cached.
report sccm

18 thoughts on “Reporting 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….?

  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?

  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)

  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.

  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?

  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.


Leave a Comment

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