How to Enable or Disable Controlled Folder Access for Microsoft Defender Antivirus in Windows 11
You enable or disable Controlled Folder Access in Windows 11 to protect your important files from ransomware and other malicious apps using Microsoft Defender Antivirus.
Controlled Folder Access is a security feature that prevents unauthorized applications from modifying files in your chosen protected folders, like Documents or Pictures.
This feature works by maintaining a list of trusted applications that are allowed to access these sensitive locations.
For example, if a new, untrusted app attempts to write to your Documents folder, Controlled Folder Access will block the action and notify you, safeguarding your data from potential threats like ransomware, which can lock your files and demand payment.
You need administrator privileges and Real-time Protection enabled in Microsoft Defender to manage this setting.
Option 1Use Windows Security Settings
- Open Windows Security.
- Click on Virus & threat protection.
- Do one of these:
- Click Manage ransomware protection under Ransomware protection, OR
- Click Manage settings under Virus & threat protection settings, then click Manage Controlled folder access
- ⚠️ Admin Required: Turn Controlled folder access On or Off (the default setting).
- If a dialog box appears asking for permission, click Yes.
- Close Windows Security when finished.



Option 2Use Command Line
- ⚠️ Admin Required: Open Windows Terminal (Admin) and choose either Windows PowerShell or Command Prompt.
- Copy and paste one of the commands below, then press Enter:
- To Turn On Controlled Folder Access:
Set-MpPreference -EnableControlledFolderAccess Enabled
- To Turn On Controlled Folder Access:
- To Turn Off Controlled Folder Access (default):
Set-MpPreference -EnableControlledFolderAccess Disabled - Close Windows Terminal when finished.
Option 3Use Local Group Policy Editor
Note: This option only works on Windows 11 Pro, Enterprise, and Education editions. Use Option Four if you have Windows 11 Home.
- ⚠️ Admin Required: Open the Local Group Policy Editor (gpedit.msc).
- In the left panel, navigate to this location:
Computer Configuration\Administrative Templates\Windows Components\Microsoft Defender Antivirus\Microsoft Defender Exploit Guard\Controlled folder access - In the right panel, double-click the Configure Controlled folder access policy.
- Choose one of these options:
To Always Turn On Controlled Folder Access:
- Select Enabled.
- In the Configure the guard my folders feature dropdown, select Block.
- Click OK.
To Turn Off Controlled Folder Access:
- Select Enabled.
- In the Configure the guard my folders feature dropdown, select Disable (Default).
- Click OK.
To Use Default Settings:
- Select Not Configured.
- Click OK.


Option 4Use Registry Editor
⚠️ Admin Required: Use this method on all Windows 11 editions, including Home.
To Always Turn On Controlled Folder Access:
Click the Download button below to download the file, then follow the installation steps.
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\Controlled Folder Access" /v EnableControlledFolderAccess /t REG_DWORD /d 1 /f
To Turn Off Controlled Folder Access:
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\Controlled Folder Access" /v EnableControlledFolderAccess /t REG_DWORD /d 0 /f
To Use Default Settings:
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\Controlled Folder Access" /v EnableControlledFolderAccess /f
Summary
What is Controlled Folder Access? It is a security feature in Windows 11 that prevents dangerous apps from changing your files.
Why should you use it? It protects your important documents and personal files from ransomware and other malicious software.
How do you turn it on? You have four options: use Windows Security settings, run a command, edit Group Policy (Pro/Enterprise/Education only), or edit the Registry. All methods require administrator access.
What happens when it is on? Trusted apps can access your protected folders normally. Untrusted apps are blocked, and you receive a warning when they try to access protected files.
Was this guide helpful?
About the Author
Richard
Tech Writer, IT Professional
Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.
No comments yet — be the first to share your thoughts!