Controlled folder access

On this page 7

Controlled folder access is a ransomware protection feature of Microsoft Defender Antivirus that blocks untrusted applications from modifying, encrypting or deleting files in a set of protected folders. It is part of Windows security on Windows 10 version 1709 and later, Windows 11 and supported Windows Server releases, and it appears in the Windows Security app under Ransomware protection.

The feature does not try to recognize ransomware by its signature. Instead, it applies an allow-list principle to write operations: only applications that Microsoft considers trustworthy, or that an administrator has explicitly allowed, may change protected data.

How controlled folder access blocks file changes

Controlled folder access works as a file system filter inside the Defender real-time protection engine. Every time a process attempts a write, rename or delete operation in a protected location, Defender checks whether that process is trusted before the change reaches the disk.

Trust comes from two sources. The first is Microsoft cloud reputation: widely used, properly signed software with a good history is allowed automatically. The second is a local allow list of executables that an administrator or user has approved. Any other process is denied write access, while reading files remains possible.

When a block occurs, Windows raises a notification and records an event in the Windows Defender operational log. The feature requires real-time protection of Microsoft Defender Antivirus to be active; if a third-party antivirus product takes over, controlled folder access stops working.

Protected folders and operating modes

By default, the feature protects the standard user library folders and several system locations, and administrators can add further paths, including network shares and mapped drives. Default folders cannot be removed from the list.

LocationTypical contentWhy it is protected
DocumentsOffice files, PDFsPrimary ransomware target
Pictures and VideosPersonal photos, recordingsOften irreplaceable
DesktopWorking files, shortcutsFrequently used storage
Music and FavoritesMedia, browser bookmarksPart of user profile data
Custom pathsProject folders, file sharesAdded by policy as needed
Default protected locations

The feature has five operating states, which let administrators test its impact before enforcing it. The numeric values are the ones used in Group Policy, Intune and PowerShell configuration.

ModeValueBehavior
Disabled0No monitoring or blocking
Block (enabled)1Untrusted writes are blocked and logged
Audit mode2Writes are allowed but logged
Block disk modification only3Protects disk sectors, not folders
Audit disk modification only4Logs disk sector writes only
Controlled folder access modes

Controlled folder access is one layer of a broader defense set, and it protects data integrity rather than preventing malware from running. The table compares it with neighboring features in Windows security.

FeatureWhat it protectsMain mechanism
Controlled folder accessUser data in chosen foldersWrite allow list per application
Attack surface reduction rulesCommon attack behaviorsBlocks risky actions such as Office child processes
Exploit protectionRunning processesMemory mitigations such as DEP and ASLR
Smart App ControlSystem as a wholeBlocks untrusted apps from running
OneDrive file restoreSynced filesRecovery after damage occurs
Related protections and their focus

The key distinction is that controlled folder access allows an unknown program to run but stops it from altering protected files. It therefore complements, but does not replace, backups and file versioning.

The layers work best together. Smart App Control or application control policies reduce the chance that malicious code starts at all, attack surface reduction rules interrupt typical delivery chains such as macro-launched scripts, and controlled folder access limits the damage if a payload still executes. Recovery features such as OneDrive version history then restore anything that slipped through. Relying on any single layer leaves gaps that ransomware operators routinely test for.

Configuring and managing the feature

Home users switch the feature on in Windows Security, under Virus and threat protection, then Ransomware protection. Organizations deploy it centrally through Microsoft Intune, Group Policy, Configuration Manager or PowerShell.

Typical PowerShell commands are Set-MpPreference -EnableControlledFolderAccess Enabled to enforce it, Add-MpPreference -ControlledFolderAccessProtectedFolders to add a path and Add-MpPreference -ControlledFolderAccessAllowedApplications to allow a specific executable. Audit mode first is the recommended rollout pattern in managed environments.

Event IDMeaningTypical use
1123Blocked change by an untrusted appInvestigate or allow the app
1124Audited change that would be blockedAssess impact before enforcement
5007Defender setting changedDetect tampering with configuration
Events used for monitoring

In Microsoft Defender for Endpoint, these events also appear in advanced hunting, which helps security teams separate genuine attacks from legitimate tools that simply lack a reputation.

Limitations and common problems

The most frequent problem is false positives: legitimate but less common software, such as older line-of-business tools, games saving progress to Documents or custom scripts, gets blocked and appears to fail without a clear error message.

  • Unsigned or niche applications are blocked until they are added to the allow list.
  • Trusted process abuse remains possible: malware that injects into an allowed process may inherit its write access.
  • Elevated attackers can disable the feature, which is why Tamper Protection should stay enabled.
  • Unprotected locations outside the list, such as other data drives, receive no protection unless added.
  • Third-party antivirus disables Defender real-time protection and therefore this feature.

Because of these limits, the feature is best treated as a last line of defense for files, combined with offline or versioned backups and least-privilege accounts.

The idea in brief

Controlled folder access is like a guard at the door of your most important folders. Any program can look at the files inside, but only programs on the guest list may change them.

Ransomware works by quietly scrambling your documents and photos. With this feature on, an unknown program that tries to rewrite those files is simply refused, and Windows tells you it stopped something. The main thing to remember is that familiar, trusted apps keep working, while unfamiliar ones need your permission before they can save changes.

A practical scenario

An accounting firm with 40 Windows 11 laptops managed through Intune decides to protect client files stored in Documents and in a mapped project share. The administrator first sets controlled folder access to audit mode for two weeks and reviews event 1124 entries in the Defender portal.

The audit reveals two legitimate tools that would be blocked: an older tax-filing utility and a scanning application that saves PDFs directly into Documents. The administrator adds both executables to the allow list and then switches the policy to block mode.

Three months later, an employee opens a malicious attachment that launches a file-encrypting payload. The payload runs, but every attempt to rewrite files in the protected folders is denied and logged as event 1123. The security team isolates the laptop, and no client files are lost.