Configure Controlled folder access: registry value EnableControlledFolderAccessComputerHKLM\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\Controlled Folder Access

Policy ID
ExploitGuard_ControlledFolderAccess_EnableControlledFolderAccess
Scope
Computer Configuration
Supported on
At least Windows Server 2016, Windows 10 Version 1709
Source
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (version 1.0)
Category
Windows Components › Microsoft Defender Antivirus › Microsoft Defender Exploit Guard › Controlled Folder Access

Registry

EnableControlledFolderAccess

-Computer

EnableControlledFolderAccess

REG_DWORDComputer
Enabled value
Depends on the option value
Element
Configure the guard my folders feature
Options
ItemStored value
Disable (Default)0
Block1
Audit Mode2
Block disk modification only3
Audit disk modification only4
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\Controlled Folder Access]

; Options (use only one)
; Disable (Default)
"EnableControlledFolderAccess"=dword:00000000
; Block
"EnableControlledFolderAccess"=dword:00000001
; Audit Mode
"EnableControlledFolderAccess"=dword:00000002
; Block disk modification only
"EnableControlledFolderAccess"=dword:00000003
; Audit disk modification only
"EnableControlledFolderAccess"=dword:00000004
CMD
:: Options (use only one)

:: Disable (Default)
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\Controlled Folder Access" /v "EnableControlledFolderAccess" /t REG_DWORD /d 0 /f
:: Block
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\Controlled Folder Access" /v "EnableControlledFolderAccess" /t REG_DWORD /d 1 /f
:: Audit Mode
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\Controlled Folder Access" /v "EnableControlledFolderAccess" /t REG_DWORD /d 2 /f
:: Block disk modification only
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\Controlled Folder Access" /v "EnableControlledFolderAccess" /t REG_DWORD /d 3 /f
:: Audit disk modification only
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\Controlled Folder Access" /v "EnableControlledFolderAccess" /t REG_DWORD /d 4 /f
PowerShell
# Common: create the key
New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\Controlled Folder Access' -Force | Out-Null

# Options (use only one)
# Disable (Default)
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\Controlled Folder Access' -Name 'EnableControlledFolderAccess' -PropertyType DWord -Value 0 -Force | Out-Null
# Block
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\Controlled Folder Access' -Name 'EnableControlledFolderAccess' -PropertyType DWord -Value 1 -Force | Out-Null
# Audit Mode
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\Controlled Folder Access' -Name 'EnableControlledFolderAccess' -PropertyType DWord -Value 2 -Force | Out-Null
# Block disk modification only
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\Controlled Folder Access' -Name 'EnableControlledFolderAccess' -PropertyType DWord -Value 3 -Force | Out-Null
# Audit disk modification only
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\Controlled Folder Access' -Name 'EnableControlledFolderAccess' -PropertyType DWord -Value 4 -Force | Out-Null