Windows Defender, built into Windows 10, runs in the background and scans your files for malware. To improve the performance of tasks such as compiling code or running virtual machines, you can add an exclusion and Windows Defender will never scan these files.
Exclusions can also be useful if you experience false positives when Windows Defender marks legitimate files as malware.
Warning: Be careful what you exclude. Windows Defender will not scan excluded files and directories for malware. You wouldn’t want to exclude everything from your Downloads folder, for example!
First of all, we need to launch Windows security to change some settings. Open the Start menu and type “Windows Security”. Then select the “Windows Security” application.
In Windows Security, go to “Virus & Threat Protection”. Then click on “Manage settings”.
In “Virus and threat protection settings”, scroll to the bottom of the page and click “Add or remove exclusions”.
On the Exclusions page, you can add or remove files that you want to exclude from Windows Defender scans. To add an exclusion, click on the “Add exclusion” button next to the large plus symbol (+).
A small menu will appear allowing you to define your exclusion by file, folder, file type or process.
What you choose depends on the type of exclusion you are trying to do. Here’s what each choice does.
File: If you select this option, a box will appear allowing you to browse your computer to select a single file that will be excluded from future scans. Select the file you want, then click “Open”.
Folder: Like the File option, this will allow you to browse your computer for a specific folder to exclude scans. The contents and subfolders of the folder will also be excluded.
File type: A box will appear asking you to enter a file extension (for example, “.MID”) representing the type of file you wish to exclude. All files of this type will be excluded from future scans. This is dangerous because you can accidentally exclude a large class of potentially dangerous files, such as PDF or DOC files.
Process: A pop-up window will ask you to enter the name of a process (a program currently running, ie “explorer.exe”) to exclude from scans. If a program you know is safe continues to be reported by Defender, you can enter it here.
Select one of these options and make the necessary selections in the following pop-up dialog.
Once you’ve added an exclusion, it will appear in a list on the Exclusions page.
If you want to delete an exclusion that you have already defined, hover your cursor over the element until the carat arrow pointing down appears, then click on the “Delete” button that appears.
When you are done, close Windows Security and your settings will be saved. The next time your system performs a Defender scan, the items you added to the exclusion list will no longer cause problems.