Forum Discussion
deep_gagan
Apr 04, 2022Copper Contributor
enroll azure ad joined devices into intune without user intervention and manual settings
Hi, is there any possibility to enroll azure ad joined devices into Intune without any user intervention and manually setting. Suppose there are 1000 azure ad joined devices on remote location, how c...
Hi,
I assume those devices are already aadj and now you want to join them to Intune. Are those users local admin or?
If the MDM scope is configured and the users are licensed for Intune you could try this
Enable automatic MDM enrollment for Azure Ad joined Devices (call4cloud.nl)
deep_gagan
Apr 06, 2022Copper Contributor
I tried the third method from your suggesting link by manually executing PowerShell script, Its creating the registry at "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\MDM" but my laptop is not getting enroll in Intune and neither its creating a schedule task.
- Apr 06, 2022Anything in the device management logs?
What happens when running C:\Windows\system32\deviceenroller.exe /c /AutoEnrollMDM as system?- deep_gaganApr 06, 2022Copper Contributorlast log is giving this message "Should show EnrollmentStatusPage result. Device: (0x0) Result (0x0)." with event id 85.
and till now I didn't run this ( C:\Windows\system32\deviceenroller.exe /c /AutoEnrollMDM ) command because I wanted to test that PowerShell script so that I can execute that remotely.
And I also wanted to know about this content. Is it also the content of PowerShell script ? then I would try this script .
$EnrollmentsPath = "HKLM:\SOFTWARE\Microsoft\Enrollments\"
$Enrollments = Get-ChildItem -Path $EnrollmentsPath
$DiscoveryServerFullUrls = @("https://wip.mam.manage.microsoft.com/Enroll")
Foreach ($Enrollment in $Enrollments) {
$EnrollmentObject = Get-ItemProperty Registry::$Enrollment
if ($EnrollmentObject."DiscoveryServiceFullURL" -in $DiscoveryServerFullUrls ) {
$EnrollmentPath = $EnrollmentsPath + $EnrollmentObject."PSChildName"
Remove-Item -Path $EnrollmentPath -Recurse
& "C:\Windows\System32\deviceenroller.exe /c /AutoEnrollMDM"
}
}
Thanks,
Gagandeep Singh