
> Remove-MpPreference -ControlledFolderAccessAllowedApplications “C:\Program Files\Windows Photo Viewer\ImagingDevices.exe” Review controlled folder access events in Windows Event Viewer If you want to remove a specific app, type this command and indicate its location at the end:.> Add-MpPreference -ControlledFolderAccessAllowedApplications “C:\Program Files\Windows Photo Viewer\ImagingDevices.exe” If you want to add a specific app that you trust to access your files and folders, type this command:.> Remove-MpPreference -ControlledFolderAccessProtectedFolders “C:\Users\abcUser\OneDrive – Microsoft” > Add-MpPreference -ControlledFolderAccessProtectedFolders “C:\Users\abcUser\OneDrive – Microsoft” If you want to add a file or folder to be protected:.

> Set-MpPreference -EnableControlledFolderAccess Enabled To Enable Controlled Folder Access by powershell command:

Windows system folders are protected by default, and you cannot remove them from the list. To remove a folder, select it, and then select Remove.To add a folder, select + Add a protected folder.If controlled folder access is turned off, you’ll need to turn it on.

Under Ransomware protection, select Manage ransomware protection.On your Windows 10 device, open the Windows Security app.You can use the Windows Security app to view the list of folders that are protected by controlled folder access. To View or change the list of protected folders The best way is possibly collecting the related activities by Advanced Hunting features of Microsoft 365 Security or Defender for Endpoint.Ĭould we search for Event ID by running the advanced hunting query or not? Ransomware acts with accessing to the files, folders and encrypting them, to respond against it, we need to enable the Windows Defender feature named “Controlled Folder Access” – WDCFA and monitor the Windows Defender Guard Events in Windows Event Viewer.
