Windows

Adding an Exclusion to Windows Defender: Guide for Windows 10/11

This guide covers adding exclusions for files, folders, or programs in Windows Defender antivirus. Helps prevent legitimate software from being blocked and improves system performance.

Updated at February 16, 2026
5-10 min
Easy
FixPedia Team
Применимо к:Windows 10Windows 11

Introduction

Windows Defender (the built-in antivirus in Windows 10 and 11) actively protects your system, but it can sometimes misidentify legitimate programs as threats. This can lead to blocking necessary software, such as specialized development tools, game launchers, or older versions of programs.

Adding an exclusion (whitelist) allows you to instruct Defender to skip specific files, folders, or file types during scans. This is safe if you trust the source and helps avoid false positives without completely disabling protection.

After completing this guide, you will be able to flexibly configure exclusions through the graphical interface, the registry, or PowerShell.

Requirements

Before you begin, ensure that:

  • You have administrator privileges (to add exclusions that apply to all users).
  • You are running Windows 10 (version 1903 or later) or Windows 11.
  • You know the exact path to the file or folder you need to exclude, or the process name.
  • The program or file you are adding is not malicious (only exclude files from verified sources).

Step-by-Step Instructions

This method is suitable for most users and does not require deep system knowledge.

  1. Open the "Windows Security" app.
    • Press Win + S, type Windows Security, and select the app from the results.
    • Or click the shield icon in the notification area (system tray) and select "Open".
  2. Navigate to the exclusions settings.
    • In the left pane, select "Virus & threat protection".
    • In the "Exclusions" section, click the "Manage settings" button.
    • Next to "Exclusions," click "Add or remove exclusions".
  3. Add a new exclusion.
    • Click the "Add an exclusion" button.
    • Select the type of exclusion:
      • File — excludes one specific file (e.g., C:\Program Files\MyApp\app.exe).
      • Folder — excludes all files within the specified folder and its subfolders (e.g., C:\MyTools\).
      • File type — excludes all files with a specific extension (e.g., .test).
      • Process — excludes a running process by name (e.g., myapp.exe).
    • Specify the path or select the file/folder via the dialog window.
    • Click "OK" to confirm.
  4. Review the list.
    • After adding, the exclusion will appear in the table. Ensure the path is correct.

Method 2: Through the Registry Editor (For Advanced Users)

If you need to add exclusions in bulk or automate the process, you can edit the registry.

  1. Press Win + R, type regedit, and press Enter.
  2. Navigate to the following path:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Exclusions\Paths
    
  3. In the right pane, right-click → New → String Value.
  4. Name the value according to the path (e.g., C:\MyFolder).
  5. Double-click the newly created value and enter the same path in the "Value data" field.
  6. Close the Registry Editor. Changes take effect immediately.

⚠️ Important: Incorrect registry editing can disrupt system functionality. Create a restore point before making changes.

Method 3: Through PowerShell (Administrator)

PowerShell allows adding exclusions via the command line, which is convenient for scripts.

  1. Open PowerShell as Administrator (Win + X → Windows PowerShell (Admin)).
  2. Use the Add-MpPreference cmdlet. Examples:
    • Exclude a folder:
      Add-MpPreference -ExclusionPath "C:\MyFolder"
      
    • Exclude a file:
      Add-MpPreference -ExclusionPath "C:\Program Files\MyApp\app.exe"
      
    • Exclude an extension .log:
      Add-MpPreference -ExclusionExtension ".log"
      
  3. To view the list of exclusions, run:
    Get-MpPreference | Select-Object -ExpandProperty ExclusionPath
    

Verifying the Result

After adding an exclusion, ensure Defender no longer blocks the object:

  1. Try to run the program or access the folder that was previously blocked.
  2. Check the protection history: In "Windows Security" → "Virus & threat protection" → "Protection history". Events related to the excluded object should not appear.
  3. If necessary, temporarily disable real-time protection (via the same settings) and check if the issue persists. Do not leave protection disabled.

Potential Issues

ProblemSolution
No administrator rightsRun the security settings or PowerShell as administrator.
Exclusion not workingEnsure the path is absolute (e.g., C:\Folder\, not \Folder\). For processes, specify only the filename (e.g., app.exe).
Defender still blocksCheck other protection components: "Malware protection" and "Windows Defender Firewall". You may need to add the exclusion there as well.
Error when adding via registryEnsure you are editing the Paths key for paths, not Extensions for file extensions.
Exclusion only applies to current userAdd the exclusion as an administrator to apply it to all users.

Conclusion

Adding exclusions to Windows Defender is a simple and effective way to eliminate false positives. Use the graphical interface for one-time tasks, and the registry or PowerShell for automation. Remember that exclusions reduce your security posture, so only add them for absolutely trusted files and regularly review your exclusion list.

F.A.Q.

How to remove an exclusion from Windows Defender?
Is it safe to add exclusions to Windows Defender?
Why does Windows Defender continue blocking a program after adding an exclusion?
Can an exclusion be added for all system users?

Hints

Open the 'Windows Security' app
Go to the 'Exclusions' section
Add an exclusion
Check the exclusions list

Did this article help you solve the problem?

FixPedia

Free encyclopedia for fixing errors. Step-by-step guides for Windows, Linux, macOS and more.

© 2026 FixPedia. All materials are available for free.

Made with for the community