Tracking Software Inventory Flow in Configuration Manager

We’ve got clients that haven’t returned software inventory and I’ve been troubleshooting it; however, the logs on some of the clients look good, so I was wondering if there was an issue with the management points and/or the site server.
There’s an excellent article by Garth Jones about troubleshooting hardware inventory ( that I’ve used as a blueprint on tracking down software inventory.

More difficulties:
1 – Software inventory is so slow
2 – Some of the clients are NATed so it’s not always straightforward when looking at the IIS logs on the management point if the client actually uploaded the inventory (since we can’t search for IP Address)
3 – With 100,000 clients, mp_sinv.log rolls over so fast

First thing to look at after kicking off Software Inventory (I used Client Center to kick off a Full Inventory) is the InventoryAgent.log on the client. You can see that the software inventory successfully finished:
20180321 1 InventoryAgent

Additionally, you can also see the queries in the FileSystemFile.log (this log if from a different workstation, the first one went off line by the time I remembered to grab this log):
20180321 2 FileSystemFile

The last log to check on the client is the CCMMessaging.log. This one will show the management point to which the client uploaded the inventory. It should also show MESSAGE PAYLOAD TRANSFER COMPLETE with a Status of SUCCESS:
20180321 3 CCMMessaging

The next place to look is the IIS logs on the management point. Jones’ article uses the client’s IP Address to find the information in the log, we can’t do that due to NAT. I used the Msg ID from the CCMMessaging.log:
20180321 4 u_ex180320

This shows that the management point successfully received the file. The next file to check is the MP_Sinv.log file, also on the management point. This shows that the management point successfully processed the inventory, created a SIC file, and put it into it’s outbox for the site server to pick up:
20180321 5 mp_sinv

The last file is the dataldr.log file on the site server. This will show that the inventory was processed for the client:
20180321 6 dataldr

If all goes well, you should be able to see this information in Resource Explorer:
20180321 7 Resource Explorer


Querying data with different XML Namespaces

Data looks like:
20180319 xml data

The default namespace is, but for the “File” element, it is

Give the namespace an alias (like desconfig) and then for each element in the tree, prefix it with the alias and a colon (i.e., “desconfig:”):

WITH XMLNAMESPACES ('' as desconfig,
, app.Description
, dt.CI_ID
, dt.SDMPackageDigest.value ('(/AppMgmtDigest/DeploymentType/Title)[1]', 'nvarchar(max)') [Title]
, dt.SDMPackageDigest.value ('(/AppMgmtDigest/DeploymentType/Installer/CustomData/EnhancedDetectionMethod/Settings/desconfig:File/desconfig:Path)[1]', 'nvarchar(max)') [FilePath]
from v_ConfigurationItems dt
INNER JOIN vSMS_CIRelation AS rel ON dt.CI_ID = rel.ToCIID
INNER JOIN fn_ListApplicationCIs_List(1033) AS app ON app.CI_ID = rel.FromCIID
dt.CIType_ID = 21 and
dt.IsLatest = 1 and
dt.SDMPackageDigest.value ('(/AppMgmtDigest/DeploymentType/Installer/CustomData/EnhancedDetectionMethod/Settings/desconfig:File/desconfig:Path)[1]', 'nvarchar(max)') is not null
order by [Title]

Good information on troubleshooting inventory

The Basics of Client Inventory in System Center Configuration Manager 2012

Especially good to know: Adding archive_reports.sms to ccm\Inventory\Temp so the client doesn’t delete the xml file after it uploads to the management point.

Updated – Troubleshoot ConfigMgr Hardware Inventory Issues

Soup to nuts – the enire flow from client to site server.

Enabling Debug Mode in the Configuration Manager Console

Been troubleshooting software inventory issues, and came across a new one for me – debug mode in the console.  It will add a new workspace:
20180316 Tools
Enable this by passing sms:debugview as a parameter to Microsoft.ConfigurationManagement.exe.

“C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\Microsoft.ConfigurationManagement.exe” SMS:DebugView

For full details, see

Querying program Execution History with command line or PowerShell

I’ve been working on fixing Software Inventory information – many computers haven’t reported software inventory in years, and I need to generate a report from it.

I found that deleting the CCM namespace and kicking off the client repair has been successful in fixing a lot of these, but I noticed in the execmgr.log that the client recognized the execution history… I had assumed it was in WMI, but it’s actually in the registry.  This allows the execution history to be read from the command line…

reg query "\\COMPUTER.DOMAIN\HKLM\SOFTWARE\Microsoft\SMS\Mobile Client\Software Distribution\Execution History" /s

With PowerShell:

Invoke-Command -ComputerName COMPUTER.DOMAIN `
{Get-ChildItem -path "HKLM:\SOFTWARE\Microsoft\SMS\Mobile Client\Software Distribution\Execution History" `
-Recurse | % { get-itemproperty -path $_.PsPath }} 

Combined Program or Task Sequence Status Report

I put up the Combined Application Status Report, but didn’t do the combined one for packages and task sequences. This report combines all statuses (Successful, In Progress, etc.) onto one page.

To make it more user friendly, there’s a parameter @Type, where the user selects “Task Sequence” or “Program”. This is to filter the drop down for Advertisement:

select AdvertisementID, AdvertisementName from v_Advertisement where (ProgramName = '*' and @Type = 'Task Sequence') or (ProgramName <> '*' and @Type = 'Program')
order by 2

This populates a second parameter, @AdvertisementID.

, s.Full_Domain_Name0
, s.Name0
, s.User_Domain0 + '\' + s.User_Name0 LastUser
, DATEADD(HH, DATEDIFF (hh, GETUTCDATE(),GETDATE()), cas.LastStatusTime) LastStatusTime
, cas.LastStateName
, cas.LastStatusMessageIDName
, cas.LastAcceptanceStateName
, cas.LastAcceptanceMessageIDName
, min (i.IP_Addresses0) IP_Address0
from v_R_System s
inner join v_ClientAdvertisementStatus cas on cas.ResourceID = s.ResourceID
inner join v_Advertisement a on a.AdvertisementID = cas.AdvertisementID
left join v_RA_System_IPAddresses i on s.ResourceID = i.ResourceID and (i.IP_Addresses0 like '1%' and i.IP_Addresses0 not like '169.%')
where cas.AdvertisementID = @AdvertisementID
group by 
, s.Full_Domain_Name0
, s.Name0
, s.User_Domain0 + '\' + s.User_Name0
, cas.LastStatusTime
, cas.LastStateName
, cas.LastStatusMessageIDName
, cas.LastAcceptanceStateName
, cas.LastAcceptanceMessageIDName
order by 2, 3

20180315 Report