Select Device Control Default Enforcement Policy: registry value DefaultEnforcementComputerHKLM\Software\Policies\Microsoft\Windows Defender\Device Control

Policy ID
DeviceControl_DefaultEnforcement
Scope
Computer Configuration
Supported on
At least Windows Server 2016, Windows 10 Version 1607
Source
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (version 1.0)
Category
Windows Components › Microsoft Defender Antivirus › Device Control

Registry

DefaultEnforcement

REG_DWORDComputer
Enabled value
Depends on the option value
Element
Select Device Control Default Enforcement Policy
Options
ItemStored value
Default Allow1
Default Deny2
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Device Control]

; Options (use only one)
; Default Allow
"DefaultEnforcement"=dword:00000001
; Default Deny
"DefaultEnforcement"=dword:00000002
CMD
:: Options (use only one)

:: Default Allow
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Device Control" /v "DefaultEnforcement" /t REG_DWORD /d 1 /f
:: Default Deny
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Device Control" /v "DefaultEnforcement" /t REG_DWORD /d 2 /f
PowerShell
# Common: create the key
New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows Defender\Device Control' -Force | Out-Null

# Options (use only one)
# Default Allow
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows Defender\Device Control' -Name 'DefaultEnforcement' -PropertyType DWord -Value 1 -Force | Out-Null
# Default Deny
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows Defender\Device Control' -Name 'DefaultEnforcement' -PropertyType DWord -Value 2 -Force | Out-Null