Retrieve the AutoPilot Hardware Hash in OOBE

Share This Post

Share on facebook
Share on linkedin
Share on twitter
Share on email

Sometimes being able to retrieve the Autopilot Hardware Hash without going through Out-Of-Box-Experience (OOBE) is really useful, especially for LAB environments. The great thing is that this is really simple to do, here are the steps. Note that the Get-WindowsAutoPilotInfo script also has an Online perimeter that can be used to directly upload the hardware hash to Intune (credentials and permissions required).

  1. On your admin PC download the Get-WindowsAutoPilotInfo.ps1 script by executing the PowerShell command bellow:
Save-Script -Name Get-WindowsAutoPilotInfo -Path C:\Temp

2. Open Windows PowerShell ISE (or any text editor such as Notepad) and create a PowerShell script called Register-AutoPilotDevice.ps1 that contains the following PowerShell commands:

Enable-PSRemoting -SkipNetworkProfileCheck -Force | Out-Null
.\Get-WindowsAutoPilotInfo.ps1 -ComputerName $env:computername -OutputFile "$env:computername.csv"

3. Lastly create a file called Start.bat with the following contents:

powershell -ExecutionPolicy Bypass -File .\Register-AutoPilotDevice.ps1

4. Save all the files to a USB Drive and attach the USB Drive to the computer that you want to extract the AutoPilot Hardware Hash from.

5. While in OOBE, press Shift + F10 to open a Command Prompt. Change to the USB Drive and run Start.bat.

6. A CSV file containing the AutoPilot Hardware Hash will be created on the USB Drive.

7. Upload the Hardware Hash to Intune, once the device has been assigned a profile in Intune reboot the device. The device should pickup the Autopilot profile and enroll accordingly.

Example of how to retrieve the AutoPilot Hardware Hash in OOBE.

Want To See More?

Endpoint Manager

Upgrading to Windows 11

Windows 11 was released on October 5th, 2021 and many have already started testing the new operating system. However the adoption rate has not been