It sounds like you're encountering a challenging issue with a device getting stuck on "Setting up your device for work" after a motherboard replacement. Here are some steps to help troubleshoot and resolve the problem:
Reset This PC: Go to Settings > Update & Security > Recovery and select Reset this PC.
Registry Cleanup: Open regedit
, navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Enrollments
, and delete old enrollment entries.
Check Enrollment Status: Run dsregcmd /status
in an elevated Command Prompt to verify the device's enrollment status.
Re-Enroll Device: Go to Settings > Accounts > Access work or school, disconnect the work account, restart the device, and re-enroll it.
Verify Autopilot Configuration: Ensure there are no duplicate entries in the Microsoft Endpoint Manager admin center.
If the issue persists, it's advisable to contact Microsoft Support for further assistance.
For reference, you can also check the Microsoft documentation on troubleshooting device enrollment issues: Microsoft Docs - Troubleshoot device enrollment