Create Custom Report for 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
- How to Configure SCCM Task sequence Pre-Cache Content
- Reporting of SCCM Task sequence Pre-Cache Content
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
- 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
- Select hardware inventory and click on Set Classes
Click on Import and Open the MOF file. You can download it from GitHub.
Click on Import. This MOF will add the “CacheInfoEx” inventory class
Select CacheInfoEx inventory class as shown below and click ok
Note: You may unselect CacheInfoEx class in the default client agent setting in production. Instead, I suggest creating a new custom agent setting and selecting the CacheInfoEx class.
In the next hardware inventory cycle, the 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 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
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.
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)
We can further customize the SQL query to get the pre-cache information specific to the task sequence and collection. RDL file for the below report is available to download from GitHub.
You can import the RDL to get a report, as shown below. Also, the total content size will help you know whether all contents referred to in the Task sequence are cached.
Vimal has more than ten 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 the technologies like SCCM, Windows 10, Microsoft Intune, and MDT.