How do I extract the Hardware ID from a Windows 10+ machine for Intune Windows Autopilot?

Summary

Extracting and uploaded hardware information from Windows 10 device is one of the key requirements for the Windows Autopilot Self Deployment scenario and can be easily accomplished using a powershell script.

Body

Extracting and uploaded hardware information from Windows 10 device is one of the key requirements for the Windows Autopilot Self Deployment scenario. The hardware hash for an existing device is available through Windows Management Instrumentation (WMI), as long as that device is running a supported version of Windows. You can use a PowerShell script to get a device's hardware hash and serial number. The serial number is useful for quickly seeing which device the hardware hash belongs to.

To install the script directly and capture the hardware hash from the local computer:

1.  Click on the the Start Menu icon

2.  Type "powershell.exe" (without the quotation marks)

3.  When Windows finds the app, click on "run as administrator" to start the app.

  

 

3.  When the app opens, type (or simply copy and paste) the following.

NOTE:  Be sure to press enter after typing each command if entering the commands individually. When the commands run, you may be prompted to confirm the change in execution policy and/or approve the installation of the script.  Be sure to select "Yes" when prompted.

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

4.  If the script has run successfully, you should see a message similar to the one below"

Gathered details for device with serial number: <Serial Number>

The output of the script can be located in C:\hwid

Details

Details

Article ID: 2446
Created
Thu 6/30/22 6:01 PM
Modified
Thu 7/7/22 12:02 PM