PowerShell script to extract hardware hash from local or remote Windows devices for Windows Autopilot enrollment in Microsoft Intune.
Registering devices in Windows Autopilot requires extracting the hardware hash from each device. This script automates that process for single or bulk devices and exports an Autopilot-ready CSV file.
- Extract hash from local machine or multiple remote computers
- Supports Group Tag for Autopilot profile assignment
- Supports Assigned User pre-assignment
- Exports CSV ready for direct import into Intune Autopilot
- Error handling for offline or unreachable devices
- PowerShell 5.1 or later
- Must run as Administrator
- WinRM enabled for remote devices
# Extract from local machine
.\Get-AutopilotHardwareHash.ps1
# Extract from multiple remote computers
.\Get-AutopilotHardwareHash.ps1 -ComputerName "PC001","PC002","PC003"
# With Group Tag and Assigned User
.\Get-AutopilotHardwareHash.ps1 -GroupTag "Corporate" -AssignedUser "john@company.com"- Autopilot CSV file ready to import at: Intune > Devices > Enroll devices > Windows Autopilot > Devices
Hamza Ali — IT Cybersecurity Engineer | Dubai, UAE