You should be able to call the %windir%\system32\deviceenroller.exe app to perform the join operation, see for example this thread: https://techcommunity.microsoft.com/t5/microsoft-intune/intune-auto-mdm-enrollment-for-devices-already-azure-ad-joined/m-p/267626/page/3
Is it possible to join a machine to Entra ID using Powershell?
Guys, I'm developing an automation script and I would like to know if it is possible to enter a machine in Entra ID automatically using Powershell, I took a look at the documentation but for but I'm still a little confused about it.
Azure Automation
Windows for business Windows Server User experience PowerShell
Microsoft Security Microsoft Entra Microsoft Entra ID
2 answers
Sort by: Most helpful
-
Vasil Michev 119.5K Reputation points MVP Volunteer Moderator
2024-10-05T15:27:16.2166667+00:00 -
Givary-MSFT 35,621 Reputation points Microsoft Employee Moderator
2024-10-10T13:00:47.5433333+00:00 @Marcos André Thank you for reaching out to us, as far I am aware there is no PowerShell command to join the device to Entra ID, I see lot of community members raised this requirement - https://feedback.azure.com/d365community/search/?q=powershell+azure+join you can upvote this feature request.
Let me know if you have any further questions, feel free to post back.