I needed to manually register a number of devices with Windows Autopilot, to do this I firstly needed to collect the hardware hashes of the devices.
There is a wealth of documentation out there that describes how to do this, such as – https://learn.microsoft.com/en-us/managed-desktop/prepare/manual-registration-existing-devices#obtain-the-hardware-hash
The challenge I had, was that the PowerShell script provided requires end-user interaction and I needed to run this script un-attended via a Group Policy Object (GPO). I managed to do this and below is my updated version of the script which writes the hardware hash to a local file on the device, in my final solution, this will write the file to a fileshare.
Find-PackageProvider -Name 'Nuget' -ForceBootstrap -IncludeDependencies
Install-Script -Name Get-WindowsAutoPilotInfo -Force
powershell -ExecutionPolicy Unrestricted Get-WindowsAutoPilotInfo -OutputFile c:\hardwarehash.csv

Leave a comment