How to Add or Remove Folders to Controlled Folder Access in Windows 11 , 10

Microsoft has introduced an anti virus software which helps in protecting the folders from any other apps attack called Defender Anti virus. In a ransomware attack where all the folders and files inside them, get attacked and you will not be able to use them because it will be locked by another process that is virus. Therefore, when you add folders to controlled folder access, it provides extra security and prevents from these ransomware attacks. By default, Windows adds Documents, Pictures, Videos, etc. folder from your Users directory to Controlled folder access. You need to be logged in as an Administrator on your system to either add or remove the folders from controlled folder access. We have explained few methods by which you can do that in this post.

How to Add or Remove Folders to Controlled Folder Access in Windows 11 using Settings

 

Step 1: Press Windows +R keys together on your keyboard to open Run dialog box.

Step 2: Type windowsdefender: in the run dialog box and hit the Enter key on your keyboard to open Windows Security.

 

Run Windowsdefender Min

 

Step 3: Select Virus & threat protection on the left side of the Window Security.

 

Virus & Threat Protection 11zon

 

Step 4: On the right side of the window, Scroll down and click on Manage settings under Virus & threat protection settings option as shown below.

 

Virus & Threat Protection Settings 11zon

 

Step 5: Then, at the bottom of the Virus & threat protection settings page, Click on Manage Controlled folder access option as shown below.



 

Manage Controlled Folder Access 11zon

 

Step 6: Click on Controlled folder access toggle button to turn it On.

 

Toggle Controlled Folder Access 11zon

 

Step 7: Accept the UAC prompt to enable the Controlled folder access by clicking Yes as shown.

 

Uac Prompt Windows Security 11zon

 

Step 8: After enabling the Controlled folder access, Click Protected folders to view the folders list as shown below.

 

Protected Folders 11zon

 

Step 9: Again, Click Yes to accept the UAC prompt to continue.

 

Uac Prompt Windows Security 11zon

 

Step 10: Then, Click Add a protected folder button to add the folder you want.

 

Add Protected Folders 11zon



 

Step 11: Browse to the folder which you want to add and select the folder.

Step 12: Then, Click Select Folder button as shown in the below image.

 

Browse Folder 11zon

 

Step 13: Now you can see that the folder which you had selected has been added to the Protected folders list.

 

Added Folder Appeared 11zon

 

Step 14: If you want to remove the Protected folder from the list, just select the folder by clicking on it.

Step 15: Then, you will see Remove button under the protected folder. Please click on it and immediately the protected folder is removed.

 

Remove The Protected Folder 11zon

 

Step 16: Once done, Close the Windows Security window.

That’s all.

 

How to Add or Remove Folders to Controlled Folder Access in Windows 11 using Local Group Policy Editor

 

Step 1: Press Windows +R keys together on your keyboard to open Run dialog box.

Step 2: Type gpedit.msc in the run dialog box and press the Enter key to open Local group policy editor.

 

Run Gpedit Min

 

Step 3: Browse through the below given path to reach Controlled Folder Access option.

Computer Configuration> Administrative Templates> Windows Components> Microsoft Defender Antivirus> Microsoft Defender Exploit Guard> Controlled Folder Access

Step 4: Select the Controlled Folder Access on the left side panel of the Local group policy editor.

Step 5: Then, on the right side of the window, Double click on Configure protected folders option as shown in the below image.

 

Configure Protected Folders 11zon

 

Step 6: In the Configure protected folders window, Select Enabled radio button and then, click Show button as shown in the below image.

 

Configure Protected Folder Enabled Show 11zon

 

Step 7: In the Show Contents window, Enter the path of the folder which you want to add to controlled folder access in the Value name field.

Step 8: Then, Enter 0 in the Value field.

Step 9: To another many folders, Enter the path of folder one after another like explained in Step 8.

Step 10: Click OK to continue.

 

Enter The Folder 11zon

 

Step 11: To remove the folders from controlled folder access, click Enabled and then tap on Show button as explained before.

Step 12: Then, Delete / Clear the path of the folder from the Show Contents window.

Step 13: Close the Local Group policy editor window after you are done.

That’s all.

 

 

How to Add or Remove Folders to Controlled Folder Access in Windows 11 using PowerShell

 

Step 1: Press Windows + R keys on your keyboard to open Run dialog box.

Step 2: Then, Type powershell in the run box and press CTRL + SHIFT + ENTER key to open PowerShell application as an admin.

 

Run Powershell Min

 

Step 3: To add the folder to the Controlled folder access, copy and paste the below command and press the Enter key to execute it.

NOTE : Please replace D:\Javascript by the path of the folder which you want to add to controlled folder access.

PowerShell Add-MpPreference -ControlledFolderAccessProtectedFolders "D:\Javascript"

 

Add Folder 11zon

 

Step 4: Execute the below given command if you want to remove any folder from Controlled folder access.

NOTE : Please replace D:\Javascript by the path of the folder which you want to remove from controlled folder access.

PowerShell Remove-MpPreference -ControlledFolderAccessProtectedFolders "D:\Javascript"

 

Remove Folder 11zon

 

Step 5: Once done, Close the PowerShell application.

That’s all.

 

How to Add or Remove Folders to Controlled Folder Access in Windows 11 using Registry Editor

 

NOTE: Please keep a back up of Registry file before proceeding with this method. Because you can revert it back anytime if something goes wrong with the registry file which can damage your system.

 

Step 1: Press Windows + R keys together on your keyboard to open Run dialog box.

Step 2: Then, type cmd in the run box and press CTRL + SHIFT + ENTER keys together to open Command Prompt as admin.

 

3 Run Cmd Optimized

 

Step 3: Execute the below commands one by one.

set key="HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\Controlled Folder Access\ProtectedFolders"

 

reg add %key%

 

Set Keys Using Cmd 11zon

 

Step 4: Close the Command Prompt.

Step 5: Press Windows + R keys together on your keyboard to open Run command box.

Step 6: Type regedit in the run box and press the Enter key to open Registry Editor.

Step 7: Accept the UAC prompt by clicking Yes to continue.

 

1 Run Regedit Optimized

 

Step 8: Copy and paste the below given path in the empty and clear address bar.

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\Controlled Folder Access

 

Step 9: Then Right click on Controlled Folder Access and select New > DWORD(32-bit) Value.



 

Controlled Folder Access New Dword Value 11zon

 

Step 10: Rename the newly created DWORD value to ExploitGuard_ControlledFolderAccess_ProtectedFolders and double click on it to open it.

Step 11: After that, Enter 1 in the Value data field and click OK.

 

Dword Value 1 11zon

 

Step 12: Copy and Paste the below path in the empty address bar again and hit the Enter key.

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\Controlled Folder Access\ProtectedFolders

Step 13: Then, make sure ProtectedFolders registry key is selected on the left side.

Step 14: On the right side, Right click on the empty space and select New > String Value.

 

Protected Folders New String Value 11zon

 

Step 15: Rename the String value to the path of the Folder you want to add to Controlled Folder Access.

Step 16: Double click on it to open it and Enter 0 to the Value data field and click OK.

 

Folder Path String Value 0 11zon

 

Step 17: If you want to remove the folder from Controlled folder access, then right click on string value folder path and select Delete option from the context menu as shown below.

 

Delete Folder Path 11zon

 

Step 18: Click Yes to confirm value delete as shown below.

 

Confirm Delete Regedit 11zon

 

Step 19: Once done, Close the Registry Editor.

That’s all.

Hope this article was useful.

Please leave the comments below.

Thank you!