Select Device Control Default Enforcement Policy
Sélectionner la stratégie d’application par défaut du contrôle d’appareil
Explanation
Default Allow: Choosing this default enforcement, will Allow any operations to occur on the attached devices if no policy rules are found to match.
Default Deny: Choosing this default enforcement, will Deny any operations to occur on the attached devices if no policy rules are found to match.
Default Enforcement will establish what decision should be made during the Device Control access checks when none of the policy rules match.
Autoriser par défaut : si vous choisissez cette application par défaut, toutes les opérations sont autorisées sur les appareils attachés si aucune règle de stratégie ne correspond.
Refus par défaut : si vous choisissez cette application par défaut, les opérations à effectuer sur les appareils attachés seront rejetées si aucune règle de stratégie ne correspond.
L’application par défaut établit la décision à prendre pendant les vérifications d’accès de Contrôle d’appareil lorsqu’aucune des règles de stratégie ne correspond.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Device Control- Value name
- not defined in the ADMX
Enable / disable values: not defined in the ADMX (see the options below).
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: WindowsDefender/DeviceControl_DefaultEnforcement
$k = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Device Control'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Select Device Control Default Enforcement Policy
# Possible options:
# Default Allow = 1
# Default Deny = 2
Set-ItemProperty -Path $k -Name 'DefaultEnforcement' -Value 1 -Type DWordDisable
# Disable: WindowsDefender/DeviceControl_DefaultEnforcement
# No value is written in the "Disabled" state (nothing defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": WindowsDefender/DeviceControl_DefaultEnforcement
$k = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Device Control'
Remove-ItemProperty -Path $k -Name 'DefaultEnforcement' -ErrorAction SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Select Device Control Default Enforcement PolicySélectionner la stratégie d’application par défaut du contrôle d’appareilDeviceControlDefaultEnforcementDropDown | Drop-down listenum | DefaultEnforcement | REG_DWORD | Required · Default choice (UI): #0
|