Introduction
Intune Autopilot is a great new cloud provisioning feature. While not as sophisticated as MECM task sequence based provisioning, it is nevertheless much easier to use and to master. Of course, before we can provision a device using Autopilot, we are required to import the hardware hash into Intune. One way to get this hardware hash is to run a PowerShell script. Another way, if the device is in the MECM database, is to run a canned MECM report called Windows AutoPilot Device Information.
Yes this report gives you the information, and with an export and some manipulation you can import this into Intune. Many MECM/SCCM administrators, however, prefer to work with MECM queries instead. They may not be so confident using the Report builder or native Transact SQL. Mostly queries are there for the administrators only and they can quickly and easily be created as needed - whether that be to supply a manager with required hardware data, or as the underlining query for a collection. And so I did create the MECM AutoPilot Hash Query.
Creating the AutoPilot Hash Query
In your MECM console navigate to Monitoring\Overview\Queries. Right Click and select Create Query. Provide a name for the Query such as AutoPilot Hash and then click on Edit Query Statement and then click Show Query Language. Paste the following query into the Query Statement box.
select SMS_G_System_PC_BIOS.SerialNumber, SMS_G_System_COMPUTER_SYSTEM_PRODUCT.IdentifyingNumber, SMS_G_System_MDM_DEVDETAIL_EXT01.DeviceHardwareData from SMS_R_System inner join SMS_G_System_PC_BIOS on SMS_G_System_PC_BIOS.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_MDM_DEVDETAIL_EXT01 on SMS_G_System_MDM_DEVDETAIL_EXT01.ResourceID = SMS_R_System.ResourceId left join SMS_G_System_COMPUTER_SYSTEM_PRODUCT on SMS_G_System_COMPUTER_SYSTEM_PRODUCT.ResourceId = SMS_R_System.ResourceId
Click on OK. Click on Next and then Next again and then on Close. If desired you can also Right Click on the newly created Query and select Properties, and then limit the results to a collection of your choice; or indeed have it configured so that you are prompted for a collection when you run the report - a very useful feature that is not included with the canned Autopilot report discussed earlier.
Creating the Intune Import csv file
Open notepad and copy into it the following line.
Device Serial Number,Windows Product ID,Hardware Hash









































.jpeg)
.jpeg)












