A streamlined batch script for collecting Windows AutoPilot hardware hashes during OOBE with automatic USB backup and serial number tracking.
Production-ready tool for IT professionals to collect Windows AutoPilot hardware hashes during OOBE. Automates the entire process including tool downloads, hardware collection, and organized USB backups with serial number tracking.
- β Zero Configuration - Auto-installs all dependencies (NuGet, Get-WindowsAutopilotInfo)
- β Auto-Elevation - Automatically requests administrator privileges via UAC
- β Serial Number Detection - Automatically appends device serial numbers to filenames
- β
Dual Backup - Saves to both local drive (
C:\HWID) and USB drive with organized folders - β Clean Output - Professional, color-coded interface with minimal clutter
- β OOBE-Friendly - Designed for use during Windows setup (Shift+F10)
- β USB Auto-Backup - Creates organized folders per device on USB drives
- β Internet Required - Downloads latest collection tools from PowerShell Gallery
- AutoPilotHWID-Collection.bat - Main collection script
- README-AutoPilot.md - Complete usage documentation
- README-AutoPilot.txt - Plain text instructions for printing
- AutoPilotHWID-Collection-SourceCode.txt - Source code for easy copying
- Windows 10/11 (OOBE or any Windows environment)
- Internet connection (for downloading collection tools)
- USB drive (optional, for automatic backup)
- Administrator privileges (script auto-elevates)
- Copy script to USB drive
- During Windows OOBE: Press
Shift + F10 - Run:
d:βAuto+TabβEnter - Wait 1-2 minutes for collection
- Upload CSV to Intune portal
See README-AutoPilot.md for complete instructions.
Local: C:\HWID\AutoPilotHWID_[SerialNumber].csv
USB: D:\AutoPilot_[SerialNumber]\AutoPilotHWID_[SerialNumber].csv
Example:
D:\AutoPilot_MZ00EERC\AutoPilotHWID_MZ00EERC.csv
- Auto-elevates to administrator privileges
- Creates workspace directory
- Retrieves device serial number from BIOS
- Installs NuGet provider from PowerShell Gallery
- Downloads Get-WindowsAutopilotInfo script
- Collects hardware hash and device information
- Saves CSV with serial number in filename
- Backs up to USB drive in organized folder
- Opens folder for easy access
- Language: Batch Script (CMD)
- Dependencies: PowerShell 5.1+, NuGet, Get-WindowsAutopilotInfo
- Execution Policy: Bypass (auto-configured)
- Scope: System-wide installation (AllUsers)
- Silent Mode: Warnings and verbose output suppressed
- Method 1: Direct CMD (standard OOBE usage)
- Method 2: Run Dialog (keyboard issues workaround)
- Method 3: Explorer (mouse-only alternative)
- Troubleshooting: Common issues and solutions
- Next Steps: Upload instructions for Intune portal
Contributions welcome! Please:
- Test on physical hardware and VMs
- Document any OOBE edge cases
- Submit issues for bugs or feature requests
- Include device models and Windows versions in reports
- Built using Microsoft's Get-WindowsAutopilotInfo script
- Designed for Microsoft Intune Windows Autopilot deployment
Made with β€οΈ for IT Professionals