Autopilot Troubleshooting - how I do it
You might find troubleshooting Autopilot Enrollment Status Page (ESP) little difficult, when it fails. In most cases, it is about application installation failures. Unfortunately, troubleshooting capabilities are not yet such good as it was with SCCM (Configuration Manager). Let me give you few tips and make it little bit easier.
Some Challenges with known methods
- In Event viewer you might find MSIINSTALLER events without any errors during Autopilot ESP crash. I've seen this many times.
- Managed Apps view in Intune Console monitoring might show you all Apps installation is still pending / waiting, because the installation status is not there yet. If you then wait and later login to the workstation, apps will eventually get installed and you can't track, which one causes the Autopilot interruption.
- IntuneManagementExtension.log is full of data, has multiple errors and you don't know what to look there. This is my main focus in this blog.
- There are few Autopilot troubleshooting guides already, like Windows Autopilot Troubleshooting - Beginners Guide - 5 Step (anoopcnair.com) but I think they are too tricky and not focusing on the main issue - application installation failures.
- You can also collect easily all MDM diagnostic files to one package, but you need to know how to work with that amount of data
Quick tips
Before going deep dive into logs, I have some easy suggestions how to make Autopilot ESP work smooth as possible
- As detection method, use Folders or Files instead of MSI product codes. I have witness several times, where MSI product code is not populated quick enough and the App installation process fails while looking for product code as detection method
- Replace hard reboot or failure exit codes with Success, if you are sure that your package really works.
- You might find Windows Autopilot Diagnostics useful to identify the root cause: Windows Autopilot diagnostics: Digging deeper – Out of Office Hours (oofhours.com) (install-script Get-AutopilotDiagnostics and Get-AutopilotDiagnostics -online)
- You can use QuickAssist (Remote Help tool by Microsoft) in Autopilot by typing C:\Windows\system32>quickassist.exe in Shift-F10 comman prompt to get remote connection to the computer failed the Autopilot ESP
Prereqs
- If you don't want to get blind by reading log file in Notepad, I suggest you get hands on log file reading tool. I use good old CMtrace taken from SCCM. You can safely use it with Intune, because in license terms, CM and Intune are from the same product family.
- You might want to create Win32 package of CMtrace.exe and add it to Autopilot installation chain. This way you will always have it when needed. I copy it directly under C:\Windows
Troubleshooting steps - how I do it
Like we all know, with Shift+F10 combination you have the access to Command Prompt during autopilot process and during its failure. There with MMC you can launch eventviewer or other consoles, and open log file with notepad or with cmtrace.
1 First, if you open Event Viewer \ Windows Logs \Application and filter it with MsiInstaller Source (see pic), you get all the installation events and the time line, when all installations happened. Understanding the time window minute by minute is especially important, if you weren't physically present and watching when ESP page fails and not marking time occurrences with pen and paper. First events will show you the Intune Extension component installation and here you understand, at what time basically entire Autopilot processing began.
2. With the CMtrace you then should open C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\IntuneManagementExtension.log file. It is also good idea to keep Event Viewer window side by side. In pic below you see example of exact event tracked in both logging systems.
3. So, considering the fact, that the log file contains all the possible Intune data in one file (not like the SCCM containing single log files for each functions, like appenforce.log which was very usefull), you will see many many lines for 1 second there. Instead of scrolling every line with time stamps, you can use keywords to track down the exact info you need to troubleshoot Application installation errors. I will provide these keywords for you.
- Sequence will reveal you the application list and order, what policies and apps installation has picked up for Autopilot process.
- You can use (name= or lpExitCode as key words to track down single application process. Here is the example of all lines which are included in Win32 app application installation.
Here, let me provide you the list of all lines which are about Win32 app installation. Typically they are all around the log file and you will not see it in one section like this, but this text box will give you the idea, what keywords to search with cmtrace.
[Win32App] #################### Start processing SelectedApps ####################
[Win32App] In EspPhase: DeviceSetup
[Win32App] Got 9 Win32App(s)
[Win32App] ExecManager: processing targeted app (name='7-zip x64 19.00', id='047f275d-a240-49b5-9bc0-c2550ab21f83') with intent=3, appApplicabilityStateDueToAssginmentFilters= for user session 0
[Win32App] ===Step=== InstallBehavior RegularWin32App, Intent 3, UninstallCommandLine Noneed.cmd
msiexec.exe /i "7-zip.msi" /quiet /norestart
[Win32App] Installation is done, collecting result
[Win32App] lpExitCode 0
[Win32App] lpExitCode is defined as Success
[Win32App] Got installationState: Completed
Comments
Post a Comment