The hardware hash for device need to be uploaded for Windows Autopilot to work and that is usually first step when you want to provision a machine using Windows Autopilot. The hardware hash can be uploaded by manufacturer / reseller for new devices. However, hardware hash need to be collected manually for the devices which are already in corporate environment and not already enrolled into Microsoft Intune.
In this blog post, we will discuss about different ways to collect hardware hash from existing devices.
- Get Hardware Hash Using Get-WindowsAutoPilotInfo.ps1 Script
- Get Device Information (Hardware Hash) for Local Device
- Get Device Information (Hardware Hash) for Remote Device
- Get Device Information (Hardware Hash) for Multiple Remote Computers (Input from text file)
- Get Device Information (Hardware hash) for Multiple Remote Devices ( Input from csv file)
- Get Device Information (Hardware hash) for Multiple Remote Devices ( Input from SCCM Collection)
- Get Device Details From SCCM
- Related Posts:
Get Hardware Hash Using Get-WindowsAutoPilotInfo.ps1 Script
The Get-WindowsAutoPilotInfo script uses WMI to retrieve properties needed for a devices to register with Windows autopilot. This script can be used to obtain hardware hash from local or remote devices. You can download PowerShell script (Get-WindowsAutoPilotInfo.ps1) from PowerShell gallery.
Get Device Information (Hardware Hash) for Local Device
To collect hardware hash for a local computer, copy the script on local computer and use the below command line. The hardware hash will be saved in CSV file in current directory.
Get-WindowsAutoPilotInfo.ps1 -outputfile HWIDVM003.CSV

Get Device Information (Hardware Hash) for Remote Device
To get hardware hash for a remote computer, run the script with -ComputerName parameter.
Get-WindowsAutoPilotInfo.ps1 -ComputerName TESTDEVICE01 -OutputFile deviceinfo.csv

Get Device Information (Hardware Hash) for Multiple Remote Computers (Input from text file)
To get hardware hash for multiple remote computers, the input can be provided from a text file. The computers name should be provided in text file in below format.

Use the below command line to collect the hardware hash. The result will be saved in CSV file.
Get-content .\Computers.txt | .\Get-WindowsAutoPilotInfo.ps1 -OutputFile deviceinfo.csv

Get Device Information (Hardware hash) for Multiple Remote Devices ( Input from csv file)
To get hardware hash for multiple remote computers, the input can be provided from a CSV file. The computers name should be provided in CSV file in below format. Please note that ComputerName column header is mandatory.

CSV file format for Get-WindowsAutoPilotInfo.ps1
Use the below command line to collect the hardware hash. The result will be saved in CSV file.
Import-Csv -path .\computers.csv | .\Get-WindowsAutoPilotInfo.ps1 -OutputFile deviceinfo.csv

Get Device Information (Hardware hash) for Multiple Remote Devices ( Input from SCCM Collection)
You can also get hardware information for members of SCCM collection using Get-WindowsAutopilotInfo.ps1 Powershell script.
To get hardware hash for members of SCCM collection, you need to get the list of collection members using Get-CMCollectionMember cmdlet and pass the input to Get-WindowsAutopilotInfo script.
Follow the below steps to get hardware hash for a member of SCCM collection. Similar to the input provided from CSV / Text file, this method also requires that machine is online as script will gather the information by connecting to remote computer WMI.
- Open Windows Powershell with Local Administrator permission
- Set execution policy to unrestricted (Set-ExecutionPolicy Unrestricted -Scope currentuser)
- Import Configuration Manager Powershell Module (Import-Module ‘C:\Program Files\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1’)
- Chnage drive letter to SCCM site code ( e.g, CD P01)
- Use below command to obtain hardware hash.
Get-CMCollectionMember -CollectionName “Test VMs” | D:\temp\Get-WindowsAutopilotInfo.ps1 -OutputFile D:\temp\deviceinfo.csv

Get Device Details From SCCM
SCCM Report : Windows AutoPilot Device Information
The built-in SCCM report “Windows AutoPilot Device Information”can be used to get hardware hash for SCCM clients. SCCM already collect these information as part of default hardware inventory and no additional configuration is required.
Follow the below steps to get the details.
- In Configuration Manager admin console, navigate to Monitoring / Reports and search “AutoPilot”.
- From the result, select “Windows AutoPilot Device Information” report and Run the report.
- Export the result to CSV file.

CMPivot Utility
CMPivot is in-console utility introducted in Configuration Manager version 1806. CMPivot allows SCCM admin to initiate a live query on select computers.
Follow the below steps to collect hardware hash using CMPivot utility.
- Launch Configuration ManagerAdmin Console
- Navigate to device collection and select any device collection that you want to collect the Hardware hash.
- Right-Click on Device collection and select Start CMPivot.
You will now see CMPivot application opened. Follow the steps mentioned below to open Get Autopilot CSV info script from Community hub and get hardware hash using that script.

- Click on the Query tab.
- Click on Community hub icon on the top right corner. Wait for the list. It may take sometime.
- Click on Get Autopilot CSV info script
- You will see the script in query editor
- Click on Run Query
- You can see the result in Result pane
Related Posts:
- Windows 10 Autopilot Deployment Guide | Intune
- Intune – Configure Enrollment Status Page (ESP)
- Intune – Windows 10 MDM- Basic troubleshooting
- Bulk enrollment of Windows 10/ 11 Device to Intune using Provisioning Package
- Enroll Windows 11 Device to Intune through Azure AD Join method
- Windows 11 enrollment with Provisioning package failed with error code 0x800700b7