Is it possible to join a machine to Entra ID using Powershell?

Marcos André 0 Reputation points
2024-10-04T19:11:53.8233333+00:00

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
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,366 questions
Windows for business Windows Server User experience PowerShell
Microsoft Security Microsoft Entra Microsoft Entra ID
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Vasil Michev 119.5K Reputation points MVP Volunteer Moderator
    2024-10-05T15:27:16.2166667+00:00

    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

    0 comments No comments

  2. 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.

    0 comments No comments

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.