We bought a set of Surface 8 pros with 21h2 version and autopilot no longer works.
it seems to be working with 2004 version.
We run this under PowerShell
Get-WindowsAutoPilotInfo.ps1
Then open Powershell instance, run
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
D:\Get-WindowsAutoPilotInfo.ps1 -OutputFile D:\surfaces.csv
we get the error “unable to retrieve device hardware data (hash) from computer localhost.”
Solutions:
It looks like a global problem for Windows 10 registration via Autopilot after installing KB5013942 – 2022-05 Cumulative Update for Windows 10 Version 21H2. No problem with Windows 11. Uninstall this KB via command wusa.exe /uninstall /KB:5013942
Ref: unable to get device data hash for Intune Autopilot enrollment – Microsoft Community