Forum Discussion
SS-Dave
Apr 01, 2022Copper Contributor
PowerShell Script to disjoin on-prem AD and join AAD
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 wou...
- Apr 06, 2022You can create a script which does the first part (Leaving Active Directory ) and joins Azure AD using a Configuration Designer package (https://www.nielskok.tech/microsoft365/unattended-azure-ad-join/) 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.
Apr 01, 2022
You could use a script which does a remove-computer to leave to AD domain and a provisioning package to join Azure AD.
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/remove-computer?view=powershell-5.1 and https://docs.microsoft.com/en-us/mem/intune/enrollment/windows-bulk-enroll
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/remove-computer?view=powershell-5.1 and https://docs.microsoft.com/en-us/mem/intune/enrollment/windows-bulk-enroll
- SS-DaveApr 06, 2022Copper Contributor
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!
- Apr 08, 2022
Was this enough information for you ?
- Apr 06, 2022You can create a script which does the first part (Leaving Active Directory ) and joins Azure AD using a Configuration Designer package (https://www.nielskok.tech/microsoft365/unattended-azure-ad-join/) 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.