In this post, we will look at the steps to resolve the MDM Logs Collection Error 0x800700a1. If you are encountering the error “Failed to collect logs. HResult:0x800700a1” during Windows Autopilot, there is an easy fix for it.
Windows Autopilot issues are tricky to troubleshoot. There are two ways to troubleshoot Windows Autopilot issues, using event logs and registry keys.
Furthermore, to troubleshoot the autopilot issues, you must obtain the MDM Diagnostic Information log from the computer. Windows Autopilot issues can often be resolved with the help of the MDM Diagnostics Tool. You can look through the MDM logs gathered from the desktop to assist in diagnosing enrollment or device management issues with Windows devices managed by an MDM server.
Fix: MDM Logs Collection Error 0x800700a1
When you attempt to collect the logs from a Windows computer using the MDM Diagnostic tool, you encounter error 0x800700a1. The error 0x800700a1 appears because you are exporting the MDM logs to directly to the root drive (C:\ drive) which is not allowed. When you export the MDM logs to a different drive or to a folder within C:\ drive, the issue is resolved.
You can collect the MDM Diagnostic Information logs using the following command:
mdmdiagnosticstool.exe -area "DeviceEnrollment;DeviceProvisioning;Autopilot" -zip "c:\users\public\documents\MDMDiagReport.zip"
MDM logs are captured in the Event Viewer in the following location: Applications and Services Logs > Microsoft > Windows > DeviceManagement-Enterprise-Diagnostic-Provider.
In the screenshot below, we see that the following command returns the error 0x800700a1. Notice that the command is configured to export the MDM logs to C:\ (root drive).
MdmDiagnosticsTool.exe -area Autopilot -cab C:\LOGS.cab
C:\WINDOWS\system32>MdmDiagnosticsTool.exe -area Autopilot -cab C:\LOGS.cab Collecting licensing information. This may take up to one minute... Collecting hardware hash information. Failed to collect logs. HResult:0x800700a1, areaName:Autopilot, compressedOutFilePath:C:\LOGS.cab
In the below command when you export the MDM logs to a temp folder within the C:\ drive (C:\temp\logs.cab), the error 0x800700a1 doesn’t appear at all. Similarly, if you are exporting the MDM error logs to a different drive (apart from C:\ drive), make sure you place the logs within the folder and not directly into the drive.
MdmDiagnosticsTool.exe -area Autopilot -cab C:\temp\LOGS.cab
C:\WINDOWS\system32>MdmDiagnosticsTool.exe -area Autopilot -cab C:\temp\LOGS.cab Collecting licensing information. This may take up to one minute... Collecting hardware hash information. Succeeded to CollectLog at: C:\temp\LOGS.cab
In the instances when you don’t have an additional hard drive on the device, you can plug in a USB device and save the MDM logs to it and later review it on your work laptop.