0

Is there still really no way to automate joining a Windows device to Azure AD via Powershell? I've looked and tried just about everything. The only methods I know of are below.

Self-service: Windows OOBE or Settings

Bulk enrollment

Windows Autopilot

Ant Pro
  • 23
  • 1
  • 7

2 Answers2

0

Currently, there is no powershell script/commandlet that can auto join with AAD.

Apart from three method which you have mentioned there is also one more method i.e., Group Policy you can make use of it.

You can also view this to decide how to plan for Azure AD

Reference: https://learn.microsoft.com/en-us/answers/questions/261596/add-computer-to-azure-ad-step-by-step.html

RahulKumarShaw
  • 4,192
  • 2
  • 5
  • 11
0

This can be done using automation in PowerShell. The perquisite is you need the credential of a user access to the window device and the credentials of a domain administrator. If you have the credentials, Then this can be done using:

Add-Computer -ComputerName Server01 -LocalCredential Server01\Admin01 -DomainName Domain02 -Credential Domain02\Admin02 -Restart -Force

and removed using:

Remove-Computer -ComputerName Server01 -UnjoinDomaincredential Domain01\Admin01 -PassThru -Verbose -Restart
user1655072
  • 572
  • 2
  • 10
  • 20