How To Add An Exclusion In Windows Security (2026)
An exclusion tells Microsoft Defender Antivirus to leave a file, folder, file type or process alone.
You set it up in Windows Security, and Microsoft says to use it only to solve a specific problem.
This guide covers the steps, the four exclusion types, the wildcard rules and how to remove an exclusion later.
Quick answer
| Step | Where |
|---|---|
| Open the app | Windows Security > Virus & threat protection |
| Open the settings | Virus & threat protection settings > Manage settings |
| Find exclusions | Exclusions > Add or remove exclusions |
| Add one | + Add an exclusion, then File, Folder, File type or Process |
| Remove one | Select it in the list, then Remove |
When an exclusion makes sense
Microsoft says to define an exclusion only to resolve a specific problem, such as a performance or app compatibility issue.
It also says not to exclude something just because it might cause a problem later.
Every exclusion is a gap in your protection, so keep the list short.
If Defender flags a file you trust, Microsoft suggests submitting the file to Microsoft Security Intelligence as a false positive instead of excluding it.
Before you exclude anything, run a Windows Security malware scan if you are not sure the file is safe.
How to add an exclusion
- Open Windows Security.
- Select Virus & threat protection.
- Under Virus & threat protection settings, select Manage settings.
- Scroll to Exclusions and select Add or remove exclusions.
- Select + Add an exclusion.
- Choose File, Folder, File type or Process, then pick the item.
The new exclusion appears in the list on the Exclusions page.
The four exclusion types
| Type | What it excludes | Notes from Microsoft |
|---|---|---|
| File | One specific file | Also called a path exclusion |
| Folder | The folder and all files in it | Also called a path exclusion |
| File type | Every file with an extension such as .docx or .pdf | Applies wherever the file is stored |
| Process | Files opened by that process | The process itself is not excluded |
To exclude a program itself, add a File or Folder exclusion for its location.
What a process exclusion does
A process exclusion keeps real-time scanning away from the files that process opens.
Microsoft advises using the full path to the program, because that makes it harder for malware to reuse a trusted process name.
Its exclusions overview adds that a process exclusion also stops network protection and attack surface reduction rules from checking that process.
Excluding a process makes Defender ignore all of that process’s other operations too.
What an exclusion covers
| Scan type | Does the exclusion apply |
|---|---|
| Real-time protection | Yes |
| On-demand scans | Yes, according to the exclusions overview |
| Scheduled scans | Yes, according to the overview; the Windows Security help page says they may still scan the item |
| Other Defender for Endpoint features | Not all of them |
Microsoft’s two pages describe scheduled scans differently, so do not assume a scheduled scan will skip the item.
Even with an exclusion, Defender still does a minimal check to see whether the exclusion applies.
Wildcards and variables
Microsoft’s exclusion reference allows the characters * and ? and environment variables.
| Rule | Detail |
|---|---|
| Maximum | Up to six wildcards in one entry |
| Drive letter | You cannot use a wildcard in place of the drive letter |
| * in a path | Matches one folder per use |
| ? | Matches a single character |
| File type | *st matches .test, .past and .invest |
| Process image name | A name such as MyProcess.exe does not allow wildcards |
| Process full path | C:\MyFolder\* covers any process in that folder |
Use system variables only, because the Defender service runs as LocalSystem.
For example, %USERPROFILE% resolves to C:\Windows\System32\config\systemprofile and not to your own profile folder.
Variables such as %ProgramFiles%, %windir% and %ProgramData% point to the same place for everyone.
What to avoid
- Do not exclude a mapped network drive, and use the real network path instead.
- Do not enter only a file name such as sample.test, because Microsoft says that does not work reliably.
- Do not exclude a whole drive or a process you do not recognise.
- Do not leave an exclusion in place after the problem it fixed is gone.
Microsoft recommends reviewing the list from time to time and keeping a note of why each entry exists.
How to remove an exclusion
- Open Windows Security > Virus & threat protection > Manage settings.
- Under Exclusions, select Add or remove exclusions.
- Select the exclusion in the list.
- Select Remove.
Removing the entry puts the item back under normal scanning.
If you cannot find or change exclusions
| What you see | Likely reason |
|---|---|
| Settings are greyed out | They were deployed through Group Policy, as on a work PC |
| No Manage settings option | Another antivirus app has taken over, so Defender turns itself off |
Microsoft says Defender turns itself off automatically when you install a compatible non-Microsoft antivirus.
In that case, set the exclusion inside the other antivirus app instead.
If the other product is one you want gone, see how to uninstall Bitdefender completely, or use the vendor’s removal tool.
Exclusions only help when Defender is blocking or slowing a file, so for slow scans see Antimalware Service Executable high CPU.
Examples of valid entries
| Type | Example entry | Meaning |
|---|---|---|
| File | c:\sample\sample.test | One file |
| Folder | c:\test\sample | Everything under the folder |
| File type | .test | The leading dot is optional |
| Process | c:\test\test.exe | Only that process |
| Process | test.exe | Any process with that name, in any location |
The full-path form of a process entry is the safer choice.
Exclusions Windows already has
Microsoft says Windows ships with built-in exclusions that do not appear in the Windows Security app.
They cover Windows Update database files, Windows Security database files and Group Policy files such as NTUser.pol.
Security intelligence updates keep them current, so you never need to add these yourself.
Folder exclusions and linked folders
A folder exclusion covers the folder and every file under it.
Microsoft says subfolders that are reparse points, such as linked or mounted folders, are not covered and need their own entries.
A reparse point folder created after the Defender service starts is not recognised until you restart Windows.
Contextual exclusions are not in the app
Microsoft also describes contextual exclusions, which limit an entry to one scan type, trigger or process.
They are written in a special syntax and are not supported in the Windows Security app.
Most home users never need them, and the four types in the app are enough.
Sources
Steps come from Microsoft’s Virus and Threat Protection in the Windows Security app, Microsoft Defender Antivirus in the Windows Security app and Microsoft Defender Antivirus exclusions pages.