In this post I’ll be detailing how to use the Get-AutopilotDiagnostics PowerShell script to obtain further information on the status of Autopilot during the provisioning process. This will help to troubleshoot failures and identify the potential source of the failure e.g. repeated failure of a particular application install.
I havent created this script, all credit goes to the creators, but it certainly is a useful script to troubleshoot Autopilot or even just to get visibility into the provisioning process. The source of the script is here –
https://www.powershellgallery.com/packages/Get-AutopilotDiagnostics/5.6
The script itself is run on the Windows device being provisioned and most suitably, during the Autopilot provisioning process. The process is as follows –
- Hit Shift + F10 to launch the Command prompt (may need to use FN+SHIFT+F10 on some laptops)
- Change Command Prompt to PowerShell by typing PowerShell and pressing enter

- Type Set-ExecutionPolicy RemoteSigned and hit enter
- Type Install-Script Get-AutopilotDiagnostics and hit enter
- Press Y and enter to accept the path variable
- Press Y and enter to accept the NuGet Provider variable
- Press Y and enter to accept the repository question

- Type Get-AutopilotDiagnostics.ps1 -Online and hit enter
- Authenticate with Microsoft Graph when requested

- The script will load a detailed output of the status of Autopilot and information including –
- Windows version
- Autopilot deployment profile
- tenant domain
- Delivery optimisation statistics
- Applications

- Rerun the script command as necessary to troubleshoot or until Autopilot completes and continues to the next stage.
- Without the -online variable, you won’t need to authenticate with Microsoft Graph, but the names of the applications etc. will not display as their logical names and rather Intune identifiers.
