How to Hybrid Join + Intune Cleanup
A step-by-step guide to reset a stuck Hybrid Azure AD Join and Intune enrollment on a Windows device.
โ When to Use This
Use this process if:
- Device is Hybrid Azure AD Joined but stuck
AzureAdPrt=NO- Intune enrollment is not working
- MDM policies are not applying
- Registry cleanup has failed (e.g., can't delete
Enrollments)
๐ฅ Step-by-Step Reset Process
1. ๐ช Remove Device from Local Domain
- Log in as local admin or domain admin.
- Open:
System Properties > Computer Name > Change - Click Workgroup, enter any name (e.g.
WORKGROUP), and apply. - Reboot when prompted.
2. ๐ Remove from Azure and Intune
Microsoft Entra:
- Go to https://entra.microsoft.com
- Navigate to:
Devices > All Devices > BCM-D003 - Click Delete.
Intune:
- Go to https://intune.microsoft.com
- Navigate to:
Devices > Windows > All Devices > BCM-D003 - Click Delete.
3. ๐งผ Local Cleanup (Post-Reboot)
- After reboot, log in as local admin.
- Open Registry Editor (
regedit). - Delete these keys if they exist:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Enrollments
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Provisioning
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Enrollments\Status
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager
- Delete the folder:
C:\ProgramData\Microsoft\DMClient
You may need to take ownership or run as SYSTEM to remove some of these.
4. ๐ Rejoin to Domain (Fresh)
- Join back to the BCMAD domain.
- Before first login, move the device into:
OU: BCM Computers - Confirm the following GPOs are linked to the OU:
- โ Hybrid Join - Automatic Registration
- โ Intune - Auto MDM Enrollment
- Reboot and log in with a cloud-synced user (with Intune license).
5. ๐งช Post-Join Checks
After reboot and login, run:
dsregcmd /status
You should see:
| Key | Value |
|---|---|
| AzureAdJoined | YES |
| AzureAdPrt | YES |
| WamDefaultSet | YES |
| IsUserAzureAD | YES |
| MdmUrl | Present โ |
If AzureAdPrt = YES, device is ready for Intune and Company Portal installs.
โ You're Clean and Ready
At this point, the device is:
- Properly joined to both domains
- Enrolled in MDM
- Ready for policy, app, and compliance rollout
Last updated: 2025-03-30
#Work/clients/bcm/IT/02-how-to-guides