Windows Autopilot requires a hardware hash to register devices manually. This guide shows you how to collect it quickly using PowerShell and export it for upload to Microsoft Intune.
Related Post: Windows 10 Autopilot Deployment Guide | Intune
- 1. Install the Script Directly from the PowerShell Gallery
- 2. Download and run the Script on each computer
- 2.1 Get Device Information (Hardware Hash) for Local Device
- 2.2. Get Hardware Hash for Remote Device
- 2.3 Get Hardware Hash for Multiple Remote Computers (Input from text file)
- 2.4 Get hardware hash for Multiple Remote Devices ( Input from csv file)
- 2.5 Get Device Information (Hardware hash) for Multiple Remote Devices ( Input from SCCM Collection)
- Get Device Hardware Hash Details From SCCM
- Related Posts:
1. Install the Script Directly from the PowerShell Gallery
You need to run the following command in elevated PowerShell to install the script directly from the PowerShell Gallery. The command will install the Get-WindowsAutopilot script, execute the script, and save the Hardware hash in the C:\HWID folder.
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
New-Item -Type Directory -Path "C:\HWID"
Set-Location -Path "C:\HWID"
$env:Path += ";C:\Program Files\WindowsPowerShell\Scripts"
Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned
Install-Script -Name Get-WindowsAutopilotInfo
Get-WindowsAutopilotInfo -OutputFile AutopilotHWID.csv2. Download and run the Script on each computer
The Get-WindowsAutoPilotInfo script uses WMI to retrieve properties needed for a device to register with Windows AutoPilot. This script can obtain hardware hash from local or remote devices. You can download the PowerShell script (Get-WindowsAutoPilotInfo.ps1) from the PowerShell gallery.
2.1 Get Device Information (Hardware Hash) for Local Device
To collect hardware hash for a local computer, copy the script to the local computer and use the command line below. The script exports the hardware hash in a CSV file in the current directory.
Get-WindowsAutoPilotInfo.ps1 -outputfile HWIDVM003.CSV

2.2. Get Hardware Hash for Remote Device
You can use the above script to get the hardware hash for autopilot for a remote computer. You need to run the script with -ComputerName parameter.
Get-WindowsAutoPilotInfo.ps1 -ComputerName TESTDEVICE01 -OutputFile deviceinfo.csv

2.3 Get Hardware Hash for Multiple Remote Computers (Input from text file)
We have shown how to get the hardware hash for autopilot for a remote computer in the last example. However, the example was for a single remote computer. To get hardware hash for multiple remote computers, the input can be provided from a text file. The computer’s name should be provided in a text file in the format below.

Use the below command line to get the autopilot hardware hash for all computers in a text file. The script will export the hardware hash in CSV file in the current directory. Please note that all devices should be online and necessary ports should be open in the firewall to establish a connection with remote WMI.
Get-content .\Computers.txt | .\Get-WindowsAutoPilotInfo.ps1 -OutputFile deviceinfo.csv

2.4 Get hardware hash for Multiple Remote Devices ( Input from csv file)
To get a hardware hash for multiple remote computers, the input can be provided from a CSV file. The computer’s name should be provided in CSV file in the format below. Please note that ComputerName column header is mandatory when you provide input from a CSV (Comma Separated File).

CSV file format for Get-WindowsAutoPilotInfo.ps1
Use the command line to collect the hardware hash. The script will export the hardware hash in a CSV file in the current directory.
Import-Csv -path .\computers.csv | .\Get-WindowsAutoPilotInfo.ps1 -OutputFile deviceinfo.csv

2.5 Get Device Information (Hardware hash) for Multiple Remote Devices ( Input from SCCM Collection)
The Get-WindowsAutopilotInfo script also accepts the input directly from the SCCM collection. To get the hardware hash for members of the SCCM collection, you need to get the list of collection members using the Get-CMCollectionMember cmdlet and pass the input to the Get-WindowsAutopilotInfo script.
Follow the steps below to get the hardware hash for a member of the SCCM collection. Similar to the input provided from CSV / Text file, this method also requires that the machine is online, as the script will gather the information by connecting to a remote computer’s 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’)
- Change drive letter to SCCM site code ( e.g, CD P01)
- Use the below command to obtain the hardware hash.
Get-CMCollectionMember -CollectionName “Test VMs” | D:\temp\Get-WindowsAutopilotInfo.ps1 -OutputFile D:\temp\deviceinfo.csv

3. Get Device Hardware Hash Details From SCCM
SCCM Report: Windows AutoPilot Device Information
The built-in SCCM report “Windows AutoPilot Device Information” pulls out the hardware hash for SCCM clients. SCCM collects this information as part of the default hardware inventory and information already present in the SCCM database.
Follow the steps below to get the details.
- In the Configuration Manager admin console, navigate to Monitoring / Reports and search for “AutoPilot”.
- From the result, select “Windows AutoPilot Device Information” report and run the report.
- Export the result to CSV file.

4. ConfigMgr CMPivot Utility
CMPivot is in-console utility introduced in Configuration Manager version 1806. CMPivot allows SCCM admin to initiate a live query on select computers. The device must be online and accessible to collect the information using CMPivot tool.
Follow the steps below to collect the hardware hash using the CMPivot utility.
- Launch Configuration Manager Admin Console
- Navigate to the 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 the CMPivot application opened. Follow the steps mentioned below to open Get Autopilot CSV info script from the Community hub and get the 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 some time.
- Click on Get Autopilot CSV info script
- You will see the script in the query editor
- Click on Run Query
- You can see the result in the Result pane
Related Posts:
- Windows Autopilot Device Preparation – Step-by-Step Guide
- 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
- How to Obtain Hardware Hash for Manually Registering Devices with Windows Autopilot
- Dynamic Group Based on Enrollment Profile in Intune.
Subscribe to Techuisitive Newsletter
Be the first to know about our new blog posts. Get our newsletters directly in your inbox and stay up to date about Modern Desktop Management technologies & news.