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.
| Location | Typical content | Why it is protected |
|---|---|---|
| Documents | Office files, PDFs | Primary ransomware target |
| Pictures and Videos | Personal photos, recordings | Often irreplaceable |
| Desktop | Working files, shortcuts | Frequently used storage |
| Music and Favorites | Media, browser bookmarks | Part of user profile data |
| Custom paths | Project folders, file shares | Added by policy as needed |
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.
| Mode | Value | Behavior |
|---|---|---|
| Disabled | 0 | No monitoring or blocking |
| Block (enabled) | 1 | Untrusted writes are blocked and logged |
| Audit mode | 2 | Writes are allowed but logged |
| Block disk modification only | 3 | Protects disk sectors, not folders |
| Audit disk modification only | 4 | Logs disk sector writes only |
Comparison with related Windows protections
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.
| Feature | What it protects | Main mechanism |
|---|---|---|
| Controlled folder access | User data in chosen folders | Write allow list per application |
| Attack surface reduction rules | Common attack behaviors | Blocks risky actions such as Office child processes |
| Exploit protection | Running processes | Memory mitigations such as DEP and ASLR |
| Smart App Control | System as a whole | Blocks untrusted apps from running |
| OneDrive file restore | Synced files | Recovery after damage occurs |
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 ID | Meaning | Typical use |
|---|---|---|
| 1123 | Blocked change by an untrusted app | Investigate or allow the app |
| 1124 | Audited change that would be blocked | Assess impact before enforcement |
| 5007 | Defender setting changed | Detect tampering with configuration |
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.