It's based on Microsoft's controlled folder access documentation on Microsoft Learn and Microsoft Support's Windows Security pages, all read on 24 November 2026. Menu wording can change between Windows updates.
Ransomware is malware that encrypts your files and demands payment to unlock them. Windows 11 includes a free defence against it in the Windows Security app, under Ransomware protection. The feature that does the work is called controlled folder access (CFA), and Microsoft's documentation says it's turned off by default. If you've never visited that page, it's almost certainly off on your PC.
This guide explains what controlled folder access does, how to turn it on, how to protect extra folders such as a second drive full of photos or game saves, and how to let a legitimate app through when it gets blocked.
What controlled folder access actually does
Microsoft describes controlled folder access as a Microsoft Defender Antivirus feature that "allows only trusted apps to change files in protected folders". When an untrusted app tries to change a file in a protected folder, it's blocked and you get a notification.
It's built on three parts:
Part | What it means |
|---|
Protected folders | Folders that untrusted apps can't modify or delete files in. There's a fixed set of default folders, and you can add more. |
Trusted apps | Apps allowed to change files in protected folders. Defender automatically trusts most apps based on their prevalence and reputation, and you can allow others yourself. |
Disk sectors | The low-level sectors that hold the boot record. Untrusted apps can't write to them directly, which Microsoft says helps block bootkits and disk-wiper malware. |
The important point is that controlled folder access doesn't stop a program running. It stops an unknown program changing files in the folders you care about. A legitimate app you've just installed may be fine until it tries to save into your Documents folder, and then you'll see a block notification.
Which folders are protected by default
According to Microsoft Learn, the defaults are the hard drive boot sectors plus these folders for each user account:
C:\Users\<username>\Documents
C:\Users\<username>\Favorites
C:\Users\<username>\Music
C:\Users\<username>\Pictures
C:\Users\<username>\Videos
The matching Public Documents, Music, Pictures and Videos folders
If a folder has been redirected, for example by OneDrive backing up your Documents folder, Microsoft says it's protected in its new location. You can't remove the defaults, but you can add more. Microsoft's consumer support page also lists Desktop among the common folders protected by default, so check the list on your own PC once the feature is on (the steps below show you where).
Before you start
Microsoft Defender Antivirus must be your active antivirus. Microsoft says controlled folder access requires Defender to be enabled and in active mode, with real-time protection on. If you use a third-party antivirus, Defender turns itself off, so you'll need to use that product's own ransomware features instead.
You need administrator rights. Windows will show a User Account Control prompt when you change these settings.
It works on Windows 11 Home. Microsoft says the feature is available on any edition of Windows that includes Defender Antivirus, giving Windows 11 Home as an example.
How to turn on controlled folder access
Open the Windows Security app (search for it from Start).
Select Virus & threat protection.
Under Virus & threat protection settings, select Manage settings.
Scroll to Controlled folder access and select Manage controlled folder access. This opens the Ransomware protection page. (You can also reach it from Virus & threat protection > Manage ransomware protection.)
Slide the Controlled folder access toggle to On.
Select Yes at the User Account Control prompt.
That's it: the default folders are now protected. Two extra options, Protected folders and Allow an app through Controlled folder access, only appear once the feature is switched on.
How to protect more folders
If you keep important files outside your user folders, say a D:\Photos folder or a projects folder on a second SSD, add them:
On the Ransomware protection page, select Protected folders.
Approve the User Account Control prompt.
Select + Add a protected folder, then browse to the folder and select it.
Repeat for any other folders.
Microsoft says subfolders of an added folder are protected too, and network shares and mapped drives are supported. Environment variables work in folder paths, but wildcards don't. Microsoft also warns that protecting shared network folders can noticeably slow network performance when an untrusted process accesses them, so be selective there.
How to let a blocked app through
Sooner or later an app you trust will be blocked: a photo editor saving to Pictures, a game writing saves to Documents, or a backup tool. Windows shows a notification and the block is also recorded in Protection history.
Microsoft's advice is to note the path of the blocked app, then allow it:
On the Ransomware protection page, select Allow an app through Controlled folder access.
Approve the User Account Control prompt.
Select + Add an allowed app.
Choose Recently blocked apps to pick it from a list, or Browse all apps to find the .exe or .com file yourself.
A few things to know:
Only allow apps you're sure about. Microsoft's support page warns that any app you add can access files in the protected folders, and if that app is ever compromised, those files could be at risk.
Location matters. Microsoft says only the app at the path you add is allowed. A file with the same name somewhere else isn't.
Restart the app afterwards. An allowed app only takes effect when the app or service starts, so close and reopen it, or restart the PC for a background service.
If a save fails, Microsoft suggests saving the file somewhere unprotected first, then allowing the app so you can save to the usual location next time.
The Windows Security app only offers On and Off. Microsoft documents three more modes that you can set with PowerShell (run as administrator):
Mode | Value | What it does |
|---|
Disabled (default) | 0 | Off. All apps can change files in protected folders and write to disk sectors. |
Enabled (Block) | 1 | Untrusted apps can't change protected files or write to disk sectors. |
Audit Mode | 2 | Nothing is blocked, but attempts are recorded. |
Block disk modification only | 3 | Blocks writes to boot sectors only; protected folders aren't enforced. |
Audit disk modification only | 4 | Records boot-sector write attempts only. |
To check the current mode:
Get-MpPreference | Format-Table EnableControlledFolderAccess
To switch to Audit Mode, which is what Microsoft recommends trying first to see what would be blocked:
Set-MpPreference -EnableControlledFolderAccess AuditMode
To add folders or allowed apps without wiping the ones you already have, use Add-MpPreference:
Add-MpPreference -ControlledFolderAccessProtectedFolders "D:\Photos"
Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Program Files\Example\app.exe"
Be careful with Set-MpPreference for folders and apps: Microsoft notes it overwrites the existing lists with whatever you specify. Unlike protected folders, allowed app paths can include wildcards, but Microsoft says to use them only in the folder part of the path, not the file name. Microsoft also notes that script engines such as PowerShell aren't trusted automatically; the only way to let them modify protected folders is to add them as an allowed app.
Audit events can be reviewed in Event Viewer, which is how you'd spot which apps would be blocked before you turn on full blocking.
Is it worth turning on for a gaming PC?
For most people, yes, as long as you're happy to approve the odd blocked app. A ransomware infection could wreck years of photos and documents, and controlled folder access costs nothing. The trade-off is occasional friction: games, mod managers, launchers and creative apps that write into Documents or Pictures may be blocked until you allow them.
If that friction bothers you, Audit Mode or the disk-only modes are a middle ground. Microsoft points out that writes to boot sectors rarely come from legitimate apps, so the disk-only block mode generates few false positives, though it doesn't protect your files.
Either way, controlled folder access isn't a replacement for backups. Microsoft's Ransomware protection page also offers a Ransomware data recovery section linked to OneDrive, and you should keep a separate copy of important files too. Our Windows 11 backup guide covers your options, and if you're weighing Defender against a paid suite, see Microsoft Defender vs paid antivirus.
Our verdict
Controlled folder access is Windows 11's built-in ransomware shield, and it's off until you turn it on. Go to Windows Security > Virus & threat protection > Manage ransomware protection and switch Controlled folder access on. Add any important folders on other drives, allow trusted apps when they're blocked (and restart them), and use PowerShell if you want Audit Mode first. It needs Microsoft Defender as your active antivirus, and it works best alongside a proper backup rather than instead of one.