Created
January 16, 2025 01:58
-
-
Save jschlackman/84883eef004f9e293036b1e57ce9084c to your computer and use it in GitHub Desktop.
Trigger Intune enrollment for Entra-joined devices that were not configured for automatic enrollment on initial join
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check enrollment URLs at | |
# https://intune.microsoft.com/#view/Microsoft_AAD_IAM/MdmConfiguration.ReactView/appId/0000000a-0000-0000-c000-000000000000/appName/Microsoft.Intune | |
# Set MDM Enrollment URLs | |
$joinedTenantKey = (Get-ChildItem 'HKLM:\SYSTEM\CurrentControlSet\Control\CloudDomainJoin\TenantInfo') | |
$joinedTenantKey | New-ItemProperty -Name 'MdmTermsOfUseUrl' -Value 'https://portal.manage.microsoft.com/TermsofUse.aspx' -PropertyType String -Force | |
$joinedTenantKey | New-ItemProperty -Name 'MdmEnrollmentUrl' -Value 'https://enrollment.manage.microsoft.com/enrollmentserver/discovery.svc' -PropertyType String -Force | |
$joinedTenantKey | New-ItemProperty -Name 'MdmComplianceUrl' -Value 'https://portal.manage.microsoft.com/?portalAction=Compliance' -PropertyType String -Force | |
# Trigger AutoEnroll | |
Start-Process "$env:SystemRoot\System32\DeviceEnroller.exe" -ArgumentList '/c /AutoEnrollMDM' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment