Enable automatic MDM enrollment using default Azure AD credentials
Activer l'inscription MDM automatique en utilisant des informations d'identification Azure AD par défaut
Explanation
This policy setting specifies whether to automatically enroll the device to the Mobile Device Management (MDM) service configured in Azure Active Directory (Azure AD). If the enrollment is successful, the device will remotely managed by the MDM service.
Important: The device must be registered in Azure AD for enrollment to succeed.
If you do not configure this policy setting, automatic MDM enrollment will not be initiated.
If you enable this policy setting, a task is created to initiate enrollment of the device to MDM service specified in the Azure AD.
If you disable this policy setting, MDM will be unenrolled.
Ce paramètre de stratégie spécifie s’il faut inscrire automatiquement l’appareil au service de gestion des appareils mobiles (MDM) configuré dans Azure Active Directory (Azure AD). Si l’inscription réussit, l'appareil sera géré à distance par le service MDM.
Important : l'appareil doit être inscrit dans Azure AD pour que l’inscription réussisse.
Si vous ne configurez pas ce paramètre de stratégie, l’inscription MDM automatique ne démarre pas.
Si vous activez ce paramètre de stratégie, une tâche est créée pour lancer l’inscription de l’appareil au service MDM spécifié dans Azure Active Directory.
Si vous désactivez ce paramètre de stratégie, l'inscription à MDM est annulée.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\CurrentVersion\MDM- Value name
AutoEnrollMDM
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_DWORD = 0 |
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.
Enable
# Enable: MDM/MDM_JoinMDM_DisplayName
$k = 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\MDM'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AutoEnrollMDM' -Value 1 -Type DWord
# Select Credential Type to Use
# Possible options:
# User Credential = 1
# Device Credential = 2
Set-ItemProperty -Path $k -Name 'UseAADCredentialType' -Value 2 -Type DWord
# MDM Application ID
Set-ItemProperty -Path $k -Name 'MDMApplicationId' -Value '<value>' -Type StringDisable
# Disable: MDM/MDM_JoinMDM_DisplayName
$k = 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\MDM'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AutoEnrollMDM' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": MDM/MDM_JoinMDM_DisplayName
$k = 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\MDM'
Remove-ItemProperty -Path $k -Name 'AutoEnrollMDM' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'UseAADCredentialType' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'MDMApplicationId' -ErrorAction SilentlyContinueOptions (2)
| Label | Control | Registry value | REG type | Constraints / details | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Select Credential Type to Use:Sélectionnez le type d'informations d'identification à utiliser :UseAADCredentialTypeDrop | Drop-down listenum | UseAADCredentialType | REG_DWORD | Default choice (UI): #1
| ||||||
| MDM Application ID:ID de l’application MDM :MDMApplicationId | Text boxtext | MDMApplicationId | REG_SZ | Max length: 255 |