Hi community and welcome to my first post of 2024! With AutoPilot you need to import a machines AutoPilot hash, or hardware ID, to register the device with the Windows AutoPilot deployment service in Azure. Ideally, the process of getting the Auto Pilot hash would be performed by the OEM, or reseller from which the devices were purchased. So here a quick guide on How to get the hardware hash imported into intune without going through the full OOBE for Autopilot.
How to get the hardware hash.
Offline
You can get the needed info with Powershell from an installed device by performing these steps:
Set the execution policy to bypass if needed set-executionpolicy bypass
Get the Get-WindowsAutoPilotScript.ps1 here.
[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.csv
The file will be stored in the C:\HWID folder on you machine, now you can upload this file in Intune.
Now your device is an autopilot ready device. The downside of this method is that you now have to reset the device to factory defaults.
In the next chapter i will show you how to get the needed information in Intune while still in the OOBE state so that you don’t need to reset the device which will save you a lot of time.
Online
During the OOBE press Shift+F10 to open a command prompt. In the command prompt type powershell
Set the execution policy to bypass set-executionpolicy bypass
Now install the script with this code:
install-script get-windowsautopilotinfo
Answer Yes to the questions.
Now enter this code:
get-windowsautopilotinfo -online
when prompted enter your Intune admin credentials.
Give consent for MS-Graph.
Now your device will be imported into Intune.
Now if you go to the devices – Enroll devices you can see that your device is imported into Intune.

Now you can add this device to a group to get a deployment profile assigned. If that has been completed you can go ahead with the OOBE installation and your device will be recognized as an autopilot device.

















0 Comments