Contents

How to Manually Register a Device for Windows Autopilot

Warning
This article was last updated on April 28, 2023, the content may be out of date.

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.

Tip

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

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
  1. Sign in to Microsoft Intune
  2. Navigate to Devices > Enrollment
  3. Select Windows, then click Devices
  4. Choose Import and upload the HWID.csv file
  1. Go to the Windows Autopilot devices screen
  2. Select your newly imported device
  3. Check the Profile status and Assigned profile fields

This method allows the device to automatically upload its hardware hash to Microsoft Intune.

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.

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.