|

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

StepWhere
Open the appWindows Security > Virus & threat protection
Open the settingsVirus & threat protection settings > Manage settings
Find exclusionsExclusions > Add or remove exclusions
Add one+ Add an exclusion, then File, Folder, File type or Process
Remove oneSelect 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

  1. Open Windows Security.
  2. Select Virus & threat protection.
  3. Under Virus & threat protection settings, select Manage settings.
  4. Scroll to Exclusions and select Add or remove exclusions.
  5. Select + Add an exclusion.
  6. 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

TypeWhat it excludesNotes from Microsoft
FileOne specific fileAlso called a path exclusion
FolderThe folder and all files in itAlso called a path exclusion
File typeEvery file with an extension such as .docx or .pdfApplies wherever the file is stored
ProcessFiles opened by that processThe 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 typeDoes the exclusion apply
Real-time protectionYes
On-demand scansYes, according to the exclusions overview
Scheduled scansYes, according to the overview; the Windows Security help page says they may still scan the item
Other Defender for Endpoint featuresNot 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.

RuleDetail
MaximumUp to six wildcards in one entry
Drive letterYou cannot use a wildcard in place of the drive letter
* in a pathMatches one folder per use
?Matches a single character
File type*st matches .test, .past and .invest
Process image nameA name such as MyProcess.exe does not allow wildcards
Process full pathC:\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

  1. Open Windows Security > Virus & threat protection > Manage settings.
  2. Under Exclusions, select Add or remove exclusions.
  3. Select the exclusion in the list.
  4. Select Remove.

Removing the entry puts the item back under normal scanning.

If you cannot find or change exclusions

What you seeLikely reason
Settings are greyed outThey were deployed through Group Policy, as on a work PC
No Manage settings optionAnother 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

TypeExample entryMeaning
Filec:\sample\sample.testOne file
Folderc:\test\sampleEverything under the folder
File type.testThe leading dot is optional
Processc:\test\test.exeOnly that process
Processtest.exeAny 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.

Leave a Reply

Your email address will not be published. Required fields are marked *