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-windowsautopilotinfocommunity

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

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


AndrewTaylor forked from the original by the legend who is Michael Niehaus



Package Details



intune endpoint MEM autopilot


Connect-ToGraph BoolToString Get-AutopilotDevice Set-AutopilotDevice Remove-AutopilotDevice Get-AutopilotImportedDevice Add-AutopilotImportedDevice Remove-AutopilotImportedDevice Get-AutopilotProfile Get-AutopilotProfileAssignedDevice ConvertTo-AutopilotConfigurationJSON Set-AutopilotProfile New-AutopilotProfile Remove-AutopilotProfile Get-AutopilotProfileAssignments Remove-AutopilotProfileAssignments Set-AutopilotProfileAssignedGroup Get-EnrollmentStatusPage Add-EnrollmentStatusPage Set-EnrollmentStatusPage Remove-EnrollmentStatusPage Invoke-AutopilotSync Get-AutopilotSyncInfo Import-AutopilotCSV Get-AutopilotEvent getdevicesandusers getallpagination


This script has no dependencies.

Release Notes

v1.0.1 - Added support to update group tag on existing devices
v1.0.2 - Updated logic used to update group tag on existing devices [lines 1982-1990, 2058-2060]
v1.0.3 - Bug Fix
v1.0.4 - Suppressed error when importing modules if in use
v2.0.0 - Added Intune Wipe and Sysprep Parameters
v3.0.0 - Support added for v2 Graph SDK
v3.0.3 - Authentication fixes
v3.0.4 - Wipe fix
v3.0.5 - Added support for pre-provisioning
v4.0.0 - Added support to delete existing devices
v4.0.1 - Import Module fix
v4.0.2 - Code Signed!!
v4.0.3 - Timestamp fix


Version History

Version Downloads Last updated
4.0.3 (current version) 1,008 11/15/2023
4.0.2 10 11/15/2023
4.0.1 279 11/9/2023
3.0.5 5,834 7/23/2023
3.0.4 731 7/13/2023
3.0.3 1,018 7/6/2023
3.0.2 46 7/6/2023
3.0.1 21 7/6/2023
3.0.0 18 7/6/2023
2.0.0 131 7/1/2023
1.0.4 199 6/20/2023
1.0.3 36 6/19/2023
1.0.1 14 6/16/2023
1.0.0 180 6/14/2023
Show more