PowerShell Script to disjoin on-prem AD and join AAD

Copper Contributor

I'm in the process of planning an on-prem AD to AAD change for ~148 users. I'd like to not have to run around and manually disjoin and rejoin devices. Does anyone know of a PowerShell script that would help automate this?

4 Replies

@Harm_Veenstra Right now we are not using Intune for device management. Is there a way to provision without Intune without going to each device?


Thank you for the tips!

best response confirmed by SS-Dave (Copper Contributor)
You can create a script which does the first part (Leaving Active Directory ) and joins Azure AD using a Configuration Designer package ( and then reboot the device. If you join Azure AD, the device can enroll itself into Intune, but if you don't have Intune it just joins Azure AD and nothing more.

Was this enough information for you ?