How to Manually Register a Device for Windows Autopilot

Windows Autopilot streamlines the setup of new devices, allowing administrators to pre-configure devices for end-users without requiring physical handling. To enroll a device in Autopilot, certain device properties—like the serial number and hardware hash—are required. These can be retrieved using a PowerShell script that leverages Windows Management Instrumentation (WMI).
In this post, I’ll guide you through the process of gathering device properties, both offline and online, for Autopilot registration. This script does not collect a Windows Product ID (PKID), which is expected, as the PKID is not required for registration.
TLS Version Requirement
Before gathering Autopilot information, note that the PowerShell Gallery no longer supports Transport Layer Security (TLS) versions 1.0 and 1.1 as of April 2020. If your system is not using TLS 1.2 or higher, you may encounter an error when accessing the PowerShell Gallery.
To ensure your system uses TLS 1.2, run the following command:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Offline Gathering of Autopilot Properties
To gather Autopilot device information offline, follow these steps:
Install-Script -Name Get-WindowsAutopilotInfo
Set-ExecutionPolicy -ExecutionPolicy Bypass
Get-WindowsAutoPilotInfo.ps1 -Output C:\HWID.csv
Upload the Device Information
- Sign in to Microsoft Intune
- Navigate to Devices > Enrollment
- Select Windows, then click Devices
- Choose Import and upload the
HWID.csvfile
Assign an Autopilot Enrollment Profile
- Go to the Windows Autopilot devices screen
- Select your newly imported device
- Check the Profile status and Assigned profile fields
Online Gathering of Autopilot Properties
This method allows the device to automatically upload its hardware hash to Microsoft Intune.
Install the PowerShell Script
Install-Script -Name Get-WindowsAutopilotInfo
Set-ExecutionPolicy -ExecutionPolicy Bypass
Get-WindowsAutoPilotInfo.ps1 -Online
After running the script, you’ll be prompted to enter credentials. Use an account with Device Administrator access in Intune. Once authenticated, the device’s hardware hash will be automatically uploaded.
Conclusion
By using the Get-WindowsAutopilotInfo PowerShell script, you can quickly gather the necessary properties—such as the serial number and hardware hash—needed to register devices with Windows Autopilot. Whether gathering this information offline or online, this process simplifies Autopilot enrollment, allowing you to efficiently configure devices for end-users.