Windows 10 Logo

Windows Defender, integrated into Windows 10, runs in the background and scans your files for malware. To improve performance for tasks like compiling code or running virtual machines, you can add an exclusion and Windows Defender will never scan those files.

Exclusions can also help if you’re running into false positives where Windows Defender marks legitimate files as malware.

Warning: Be careful about what you exclude. Windows Defender won’t scan your excluded files and directories for malware. You wouldn’t want to exclude everything in your Downloads folder, for example!

First, we need to launch Windows Security to change some settings. Open the Start menu and type “Windows Security.” Then, select the “Windows Security” app.

Launch Windows Security from Start menu in Windows 10

In Windows Security, navigate to “Virus & Threat Protection.” Then, click “Manage Settings.”

In “Virus & Threat Protection Settings,” scroll down to the very bottom of the page, and click “Add or Remove Exclusions.”

Select add or remove exclusions to Windows Defender in Windows 10

On the Exclusions page, you can add or remove files that you want to exclude from Windows Defender scans. To add an exclusion, click the “Add An Exclusion” button beside the large plus symbol (+).

A small menu will pop up allowing you to define your exclusion by File, Folder, File type, or Process.

Exclusion types menu in Windows Security for Windows 10

What you choose depends on what type of exclusion you are trying to make. Here’s what each choice does.

  • File: If you select this, a box will pop up allowing you to browse your computer to select a single file that will be excluded from future scans. Select the file you’d like, then click “Open.”
  • Folder: Like the File option, this will let your browse your computer for a specific folder to exclude from scans. The folder’s contents and subfolders will be excluded as well.
  • File type: A box will pop up asking you to enter a file extension (e.g., “.MID”) representing the file type that you’d like to exclude. All files of that type will be excluded from future scans. This one is dangerous because you might accidentally exclude a large class of potentially hazardous files, such as PDF or DOC files.
  • Process: A pop-up will ask you to enter the name of a process (a running program, i.e., “explorer.exe”) to exclude from scans. If a certain program you know is safe keeps getting flagged by Defender, you can enter it here.

Select one of these options and make the necessary selections in the pop-up dialog that follows.

Selecting a file to exclude from Windows Defender scans in Windows Security Settings for Windows 10

Once you add an exclusion, it will show up in a list on the Exclusions page.

A list of Windows Defender scan exclusions in Windows 10

If you’d like to remove an exclusion you’ve already defined, hover your mouse cursor over the item until the downward-pointing carat arrow appears, then click the “Remove” button that pops up.

Removing an exclusion from Windows Defender scan settings in Windows 10

When you’re all done, close Windows Security and your settings will be saved. The next time your system does a Defender scan, the items you added to the exclusions list will no longer cause trouble.

Profile Photo for Benj Edwards Benj Edwards
Benj Edwards is a former Associate Editor for How-To Geek. Now, he is an AI and Machine Learning Reporter for Ars Technica. For over 15 years, he has written about technology and tech history for sites such as The Atlantic, Fast Company, PCMag, PCWorld, Macworld, Ars Technica, and Wired. In 2005, he created Vintage Computing and Gaming, a blog devoted to tech history. He also created The Culture of Tech podcast and regularly contributes to the Retronauts retrogaming podcast.
Read Full Bio »