CCMSetup.log ‘Failed to download client files by BITS. Error 0x80080005’

When attempting to install the ConfigMgr client on a computer error ‘Failed to download client files by BITS. Error 0x80080005’ is seen in the CCMSetup.log file.

The BITS service is stopped and gives an error when trying to start it.

When checking the System Event Log, the following error occurs for the Bits-Client source with event ID 16392.

The BITS service failed to start. Error 0x8E5E0226.

The fix, as found here, is to remove all files from “C:\ProgramData\Microsoft\Network\Downloader”, then try to start the BITS service.

Remove-Item -Path c:\ProgramData\Microsoft\Network\Downloader -Filter * -Force -Recurse

SQL to retrieve all collections

Below is the SQL code needed to retrieve all of the collections from ConfigMgr. This is useful when creating custom reports that need to be scoped to a specific collection. The query below selects the CollectionName and CollectionID columns and sorts the CollectionName column alphabetically.

SELECT        CollectionName, CollectionID
FROM            v_Collections
ORDER BY CollectionName

Results from the query on my test system.

SQL to get last hardware scan

The last hardware scan is stored in the view v_GS_WORKSTATION_STATUS. When joined with either v_R_System_Valid or v_R_System, you can retrieve the last hardware scan for a computer.

The SQL code below will return the last hardware scan date for all computers in the ConfigMgr system.

SELECT        v_R_System_Valid.Netbios_Name0, v_GS_WORKSTATION_STATUS.LastHWScan
FROM            v_GS_WORKSTATION_STATUS INNER JOIN
                         v_R_System_Valid ON v_GS_WORKSTATION_STATUS.ResourceID = v_R_System_Valid.ResourceID
Results from the above query.

If you need to return the last hardware scan for a single computer you can use the query below to filter by the computer name. In this example, we filtered on computer ‘pc01’.

SELECT        v_R_System_Valid.Netbios_Name0, v_GS_WORKSTATION_STATUS.LastHWScan
FROM            v_GS_WORKSTATION_STATUS INNER JOIN
                         v_R_System_Valid ON v_GS_WORKSTATION_STATUS.ResourceID = v_R_System_Valid.ResourceID
WHERE        (v_R_System_Valid.Netbios_Name0 = N'pc01')
Results from the above query.