Intune Stuff | The Community place for Microsoft Intune, Intune Suite, Autopilot, macOS Management, Copilot for Security.

How to get the hardware hash imported into intune without going through the full OOBE for Autopilot

by | Jan 8, 2024 | Autopilot, Blog, Graph, Intune, Manuals, MDM, Microsoft, News, Top Stories | 0 comments

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.

The import can take a few minutes to complete.

Now if you go to the devices – Enroll devices you can see that your device is imported into Intune.

hardware hash

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

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from IntuneStuff

Subscribe now to keep reading and get access to the full archive.

Continue reading