fbpx
Select Page

ConfigMgr Report: Autopilot Info Listing Computer Name, Serial Number and Hardware Hash

Sometimes the Built-In SCCM Report Just Doesn’t Show What You Need

As part of a project, we wanted to take a batch of domain-joined laptops and manage them through Intune and Autopilot. 

To enroll the devices, Intune needs certain info off of each computer. We installed the ConfigMgr client on each machine to get a hardware inventory list of each. 

This turned out to be a better idea than we’d thought at the time. 

Doesn’t ConfigMgr Have a Built-In Report For This?

Yes, it does!

Under Reports > Hardware – General is a report, Windows Autopilot Device Information.

However, this isn’t exactly what we needed. We had a customized script that could pull all of the Autopilot info off of a machine, but what I wanted was:

 

  • Only the machines we were enrolling into Autopilot, and
  • The list needed to show computer names

 

Craig Wall is a public sector systems administrator with experience in deployment and print management.

Why We Needed The Report

Because of the way we had the devices domain-joined beforehand, and our plan to get them done as remotely as possible, we needed to make sure we could easily match up the domain-joined, pre-enrollment names with the device serial. 

The hardware hash for each in this case may only be necessary in certain situations — we had a customized script for our environment to pull that info. 

However, I’m always game to work on my reporting skills.

The Tables/Views Needed

  • Hardware Hash: v_GS_MDM_DEVDETAIL_EXT01 (DeviceHardwareData0)
  • Serial Number: v_GS_SYSTEM_ENCLOSURE (SerialNumber0)
  • Computer Name: v_GS_SYSTEM (Name0)

The SQL Query

SELECT v_GS_SYSTEM.ResourceID AS [v_GS_SYSTEM ResourceID],v_GS_SYSTEM.Name0,v_GS_MDM_DEVDETAIL_EXT01.ResourceID AS [v_GS_MDM_DEVDETAIL_EXT01 ResourceID],v_GS_MDM_DEVDETAIL_EXT01.DeviceHardwareData0,v_GS_SYSTEM_ENCLOSURE.ResourceID AS [v_GS_SYSTEM_ENCLOSURE ResourceID],v_GS_SYSTEM_ENCLOSURE.SerialNumber0
FROM v_GS_SYSTEM
INNER JOIN v_GS_MDM_DEVDETAIL_EXT01
ON v_GS_SYSTEM.ResourceID = v_GS_MDM_DEVDETAIL_EXT01.ResourceID
INNER JOIN v_GS_SYSTEM_ENCLOSURE
ON v_GS_SYSTEM.ResourceID = v_GS_SYSTEM_ENCLOSURE.ResourceID
WHERE
(v_GS_SYSTEM.Name0 like 'LAPTOP%')

The Output

I whipped up a quick table in Report Builder for this. 

Because the hashes are so long, I didn’t want all of them listed in one big mess. So I left grouping on for the table.

This resulted in each computer being its own “group” in the table — I had to click the + icon next to each laptop to expand the row and show the serial and hash. 

This worked out well for the specific use of this report, but the report couldn’t be emailed to anyone because those + signs don’t show up in the report email — something to watch for if you were going to send a report in the email instead of sending the report URL.

More Posts Like This

More From Craig

Weight Loss Test Post

Optional Subtitle Error: Error message goes here Cause: Can put a cause here Solution: Create a something or other. See below. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur tincidunt mollis ante non volutpat. Nam consequat diam nec leo rutrum...