How to remove the Hybrid Azure AD join-ed Windows Server that is Registered = Pending without rebooting servers?

EnterpriseArchitect 6,041 Reputation points
2023-08-01T14:59:46.7233333+00:00

After following the suggested steps in enabling the HAADJ:

  1. First: Targeted deployments of hybrid Azure AD join - Microsoft Entra | Microsoft Learn
  2. Followed by: Configure hybrid Azure Active Directory join - Microsoft Entra | Microsoft Learn

All of my 1000+ production Windows Server 2016 – 2019 and 2022 VM are now showing like below:

Screenshot 2023-08-02 004157

This incident has caused me some trouble in manually removing by issuing the command like below with no error.

dsregcmd.exe /leave /debug

User's image

As you can see from the above, CN=Device Registration Configuration container name has been reset to blank in the ADSI edit.

However, the device itself is still not removed from the Azure AD console despite the manual efforts to delete the Registered = Pending from the https://portal.azure.com/#view/Microsoft_AAD_Devices/DevicesMenuBlade/~/Devices/menuId~/null

all of them are still listed back as Hybrid Azure AD joined after a few minutes have passed.

Any help would be greatly appreciated.

Microsoft Security | Intune | Configuration
Microsoft Security | Intune | Enrollment
Microsoft Security | Microsoft Entra | Microsoft Entra ID
Microsoft Security | Intune | Other
Microsoft Security | Microsoft Graph
{count} votes

1 answer

Sort by: Most helpful
  1. Crystal-MSFT 53,991 Reputation points Microsoft External Staff
    2023-08-02T01:43:36.62+00:00

    @EnterpriseArchitect, Thanks for posting in Q&A. Based on my experience, if the records are still in Azure AD, we can remove these Hybrid Azure AD joined device records in Azure AD portal.

    Meanwhile, if you want to just do Hybrid Azure AD join for some devices, you can create an OU to put the users and devices you want, configure the customize synchronization options in Azure AD connect to only sync the users and devices in your specific OU.

    User's image

    User's image

    Hope the above information can help.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.