A great tool for troubleshooting Intune is Get-IntuneManagementExtensionDiagnostics v2.0.
This script analyzes the Microsoft Intune Management Extension (IME) logs and creates a timeline report from found events.
The script can be downloaded over here GitHub – petripaavola/Get-IntuneManagementExtensionDiagnostics: Get-IntuneManagementExtensionDiagnostics script analyzes Intune IME logs and shows events in Timeline
Download script from PowershellGallery
Save-Script Get-IntuneManagementExtensionDiagnostics -Path ./
Run script
./Get-IntuneManagementExtensionDiagnostics.ps1
# or to get Intune Powershell script names from Graph API use -Online parameter
./Get-IntuneManagementExtensionDiagnostics.ps1 -Online
-Online parameter will download Powershell script names from Graph API.
It requires the Intune Powershell management module Microsoft.Graph.Intune
Install-Module -Name Microsoft.Graph.Intune -Scope CurrentUser
Use during Windows Autopilot (Pre-Provisioning or Enrollment Status Page)
Press Shift-F10 which will open the Command Prompt
Powershell.exe
cd C:\ProgramData
Set-ExecutionPolicy bypass -Scope Process
Save-Script Get-IntuneManagementExtensionDiagnostics -Path ./
.\Get-IntuneManagementExtensionDiagnostics.ps1
# -Online when you need to get displayNames to Powershell scripts
.\Get-IntuneManagementExtensionDiagnostics.ps1 -Online