Get a device’s hardware hash and serial number

To get a device’s hardware Hash (Hardware ID), run the following commands in Powershell or save as .ps1.

Note: In Windows 10 version 1809 and earlier, it’s important to capture the hardware hash and create an Autopilot device profile before you connect a device to the internet.

Set-Location -Path "C:HWID"
Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned
Install-Script -Name Get-WindowsAutoPilotInfo
Get-WindowsAutoPilotInfo -OutputFile AutoPilotHWID.csv