How to add an exception in Windows Defender on Windows 10

How to add an exception in Windows Defender on Windows 10

Windows Defender, built into Windows 10, runs in the background and scans files for malware. To improve performance for tasks like compiling code or running a virtual machine, you can add exceptions and Windows Defender will never scan those files.

Warning : Be careful about what you exclude. Windows Defender will not scan excluded files and folders for malware.

How to add an exception for Windows Defender in Windows Security

Step 1:

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

Step 2:

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

In Windows Security, navigate to Virus & Threat Protection

Step 3:

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

Step 4:

On the Exclusions page, you can add or delete files that you want to exclude from Windows Defender scanning. To add an exception, click the Add An Exclusion button next to the large plus ( + ) icon.

Click the Add An Exclusion button

Step 5:

A small menu will appear allowing you to define the exception by File, Folder, File type or Process (file, folder, file type or process).

A small menu will appear allowing you to define the exception

What you choose depends on the type of exception you are trying to make. Here’s what each option will do.

  • File: If you select this option, a box will appear allowing you to browse your computer to select a file to be excluded from future scans. Select the file you like, then click Open.
  • Folder: Like the File option, this will allow the computer to be browsed to find a particular folder and exclude it from scanning. Content and subdirectories in this directory will also be excluded.
  • File type : A box will appear asking you to enter a file extension (eg. .MID ) representing the file type you can exclude. All files of that type will be excluded from future scans. This is very dangerous, as you could inadvertently exclude a large group of potentially malicious files, such as PDFs or DOC files.
  • Process : A window will appear asking you to enter the name of a process (a running program, such as explorer.exe ) to exclude from the scan. If a program you know is safe, but will be flagged by Defender, you can enter it here.

Select one of these options and make the necessary selections in the following pop-up dialog. When you add an exception, it will show up in a list on the Exclusions page .

Exceptions will show up in a list on the Exclusions page

Step 6:

If you want to remove a specified exception, hover your mouse pointer over the item until a downward arrow appears, then click the Remove button.

Click the Remove button to remove the exception

Step 7:

Once done, close Windows Security and your settings will be saved. The next time the system does a Defender scan, the items you added to the exclusion list should no longer cause trouble.

How to add an exception in Windows Defender using PowerShell

Add exception file for Microsoft Defender Antivirus in PowerShell

This option is used to add a specific exception file, preventing it from being scanned by Microsoft Defender Antivirus anymore.

1. Open PowerShell as admin.

2. Enter the command below into PowerShell and press Enter.

Add-MpPreference -ExclusionPath "<đường dẫn đầy đủ của file>" -Force

3. Now, you can close PowerShell if you want.

Add exception file for Microsoft Defender Antivirus in PowerShell

Add exception folder for Microsoft Defender Antivirus in PowerShell

This option is used to add a specific exception folder, preventing it from being scanned by Microsoft Defender Antivirus anymore.

1. Open PowerShell as admin.

2. Enter the command below into PowerShell and press Enter.

Add-MpPreference -ExclusionPath "<đường dẫn đầy đủ của file>" -Force

3. Now, you can close PowerShell if you want.

Add exception folder for Microsoft Defender Antivirus in PowerShell

Added exception file type for Microsoft Defender Antivirus in PowerShell

This option is to add a file extension to the exception, preventing all files of that type from being scanned by Microsoft Defender Antivirus anymore.

1. Open PowerShell as admin.

2. Enter the command below into PowerShell and press Enter.

Add-MpPreference -ExclusionExtension "<Phần mở rộng của loại file>" -Force

3. Now, you can close PowerShell if you want.

Added exception file type for Microsoft Defender Antivirus in PowerShell

Add exception process for Microsoft Defender Antivirus in PowerShell

This option is used to add an exception process, so that any files associated with it are no longer scanned by Microsoft Defender Antivirus.

1. Open PowerShell as admin.

2. Enter the command below into PowerShell and press Enter.

Add-MpPreference -ExclusionProcess "<tên tiến trình>" -Force

3. Now, you can close PowerShell if you want.

Add exception process for Microsoft Defender Antivirus in PowerShell

See more:

  • How to turn off real-time protection in Microsoft Defender on Windows 10
1