This script uses WMI to retrieve properties needed for a customer to register a device with Windows Autopilot.  Note that it is normal for the resulting CSV file to not collect a Windows Product ID (PKID) value since this is not required to register a device.  Only the serial number and hardware hash will be populated.

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Script -Name Get-WindowsAutoPilotInfo -RequiredVersion 2.3

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More


Michael Niehaus



Windows AutoPilot


This script has no dependencies.

Release Notes

Version 1.0:  Original published version.
Version 1.1:  Added -Append switch.
Version 1.2:  Added -Credential switch.
Version 1.3:  Added -Partner switch.
Version 1.4:  Switched from Get-WMIObject to Get-CimInstance.
Version 1.5:  Added -GroupTag parameter.
Version 1.6:  Bumped version number (no other change).
Version 2.0:  Added -Online parameter.
Version 2.1:  Bug fix.
Version 2.3:  Updated comments.

Version History

Version Downloads Last updated
3.5 29,469,924 9/21/2020
3.4 53,072 9/8/2020
3.3 269,375 7/27/2020
3.1 7,104 7/26/2020
3.0 7,341 7/23/2020
2.9 386 7/23/2020
2.7 14,199 7/21/2020
2.6 6,021 7/19/2020
2.5 25,846 7/14/2020
2.4 5,137 7/13/2020
2.3 (current version) 257,119 5/16/2020
Show less