Troubleshooting Autopilot Enrollment

Windows Autopilot simplifies the deployment of new devices, enabling you to configure and manage devices with minimal user intervention. However, like any automated system, issues can arise during the enrollment process. When Autopilot enrollment fails or encounters errors, diagnosing the problem can be challenging.
In this post, I’ll walk you through using a PowerShell script that simplifies the process of gathering diagnostics information from the current PC or a captured set of logs. This script provides valuable insights into Autopilot profile settings, Enrollment Status Page (ESP) tracking for policies, apps, and certificates, and more.
Installation
To get started, install the diagnostics script from the PowerShell Gallery. The script, called Get-AutopilotDiagnostics, provides a straightforward way to gather key information about Autopilot enrollments.
Install-Script -Name Get-AutopilotDiagnostics
Usage
Once installed, you can run the script during the Out of Box Experience (OOBE) or the Device Enrollment Status Page (ESP) to collect diagnostics information.
Get-AutoPilotDiagnostics -Online
This command provides real-time diagnostics and captures details such as:
- Autopilot Profile Settings: Information about the applied profile, device group assignments, and configuration
- ESP Details: Policies, apps, and certificates tracked via the Enrollment Status Page
- Additional Information: Enrollment state, network configuration, and account setup
Troubleshooting Tips
- Profile Mismatch: Check the diagnostics output to confirm the correct profile is applied
- ESP Hang-Ups: Identify apps or policies causing delays during enrollment
- Certificate and Policy Issues: Review failed or incomplete deployments to resolve configuration problems
Source
This script is sourced from the PowerShell Gallery. For more details and updates, visit:
PowerShell Gallery – Get-AutopilotDiagnostics
Conclusion
Autopilot is a fantastic tool for automating device setup, but when things go wrong, it’s essential to have the right tools to troubleshoot the issues. The Get-AutopilotDiagnostics script provides a quick and efficient way to gather and analyze diagnostics information, helping you resolve enrollment issues faster.
By using this script, you can ensure that your devices complete the Autopilot process smoothly, reducing downtime and minimizing user frustration.