How to add exceptions 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 virtual machines, you can add exceptions so Windows Defender never scans those files.

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

How to add exceptions to 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.

How to add exceptions in Windows Defender on Windows 10
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 remove 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 sign ( + ) icon.

How to add exceptions in Windows Defender on Windows 10
Click the Add An Exclusion button

Step 5:

A small menu will appear that allows you to specify the exception by File, Folder, File type or Process .

How to add exceptions in Windows Defender on Windows 10
A small menu will appear allowing you to define the exception.

What you choose depends on the type of exception you are trying to throw. Here is what each option will do.

  • File: If you select this, a box will appear that allows you to browse your computer to select a 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 and exclude it from scanning. The contents and subfolders within this folder will also be excluded.
  • File type : A box will appear asking you to enter the file extension (e.g. .MID ) that represents the type of file you want to exclude. All files of that type will be excluded from future scans. This is dangerous, as you could accidentally exclude a large group of potentially malicious files, such as PDF 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 scanning. If there is a program that you know is safe, but would 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 box. When you add an exception, it will appear in a list on the Exclusions page.

How to add exceptions in Windows Defender on Windows 10
Exceptions will be displayed in a list on the Exclusions page.

Step 6:

If you want to remove a defined exception, hover your mouse over it until a down arrow appears, then click the Remove button .

How to add exceptions in Windows Defender on Windows 10
Click the Remove button to remove the exception.

Step 7:

Once you're done, close Windows Security and your settings will be saved. The next time the system runs a Defender scan, the items you added to the exclusion list won't cause any problems.

How to Add Exceptions in Windows Defender Using PowerShell

Add exception file for Microsoft Defender Antivirus in PowerShell

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

1. Open PowerShell with admin rights .

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

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

3. You can now close PowerShell if you want.

How to add exceptions in Windows Defender on Windows 10
Add exception file for Microsoft Defender Antivirus in PowerShell

Add an exception folder for Microsoft Defender Antivirus in PowerShell

This option is used to add a specific exception folder, making it no longer scanned by Microsoft Defender Antivirus.

1. Open PowerShell with admin rights.

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

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

3. You can now close PowerShell if you want.

How to add exceptions in Windows Defender on Windows 10
Add an exception folder for Microsoft Defender Antivirus in PowerShell

Add file type exceptions to Microsoft Defender Antivirus in PowerShell

This option is to add a file extension to the exception, causing all files of that type to no longer be scanned by Microsoft Defender Antivirus.

1. Open PowerShell with admin rights.

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

Add-MpPreference -ExclusionExtension "" -Force

3. You can now close PowerShell if you want.

How to add exceptions in Windows Defender on Windows 10
Add file type exceptions to Microsoft Defender Antivirus in PowerShell

Add process exceptions to Microsoft Defender Antivirus in PowerShell

This option is used to add an exception process, which prevents any files associated with it from being scanned by Microsoft Defender Antivirus.

1. Open PowerShell with admin rights.

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

Add-MpPreference -ExclusionProcess "" -Force

3. You can now close PowerShell if you want.

How to add exceptions in Windows Defender on Windows 10
Add process exceptions to Microsoft Defender Antivirus in PowerShell

See also:

Sign up and earn $1000 a day ⋙

Leave a Comment

Microsoft details Bluetooth LE Audio requirements and support for Windows 11, 10

Microsoft details Bluetooth LE Audio requirements and support for Windows 11, 10

Microsoft introduced Bluetooth LE (low energy) Audio support with Windows 11 22H2 KB5026446 (build 22621.1778), also known as Moment 3, in May 2023.

How to Change the Default User Account Avatar in Windows

How to Change the Default User Account Avatar in Windows

Changing your avatar on Windows 10 to your own photo, or a completely new style, will help you distinguish between user accounts on your computer.

Windows 11 Market Share Is Quickly Catching Up to Windows 10

Windows 11 Market Share Is Quickly Catching Up to Windows 10

The October 2024 report provides an overview of Windows 11's market share compared to other versions of Windows.

How to enable or disable Secure Sign-In on Windows 10, Windows 11

How to enable or disable Secure Sign-In on Windows 10, Windows 11

Windows is the most targeted operating system by hackers. Therefore, you should strengthen your PC's defenses to stay safe both online and offline. This article will guide you on how to enable or disable Secure Sign-In in Windows 10.

How to add a printer to Windows 10

How to add a printer to Windows 10

Adding a printer to Windows 10 is simple, although the process for wired devices will be different than for wireless devices.

The methods and customizations in this article will help speed up your Windows 10 like the wind.

The methods and customizations in this article will help speed up your Windows 10 like the wind.

Do you want to speed up Windows 10, improve Windows 10 speed or speed up Windows 10 startup? All ways to speed up Windows 10 are in this article, please read and apply to make your Windows 10 computer run faster!

15 Diagnostic Tools to Check the Health of Your Windows PC

15 Diagnostic Tools to Check the Health of Your Windows PC

Whether you're new to Windows or a veteran, your system will eventually run into problems that aren't easy to diagnose. Before calling tech support, there are a number of PC diagnostic tools you can try.

How to Use Clipboard History in Windows 10

How to Use Clipboard History in Windows 10

Windows clipboard history got a major overhaul with the Windows 10 October update.

Microsoft is bringing annoying Windows 11 Start menu ads to Windows 10

Microsoft is bringing annoying Windows 11 Start menu ads to Windows 10

Microsoft continues to announce plans to add new features to Windows 10, despite the fact that the operating system will inevitably die in October 2025.

Why do so many people downgrade from Windows 11 to Windows 10?

Why do so many people downgrade from Windows 11 to Windows 10?

Although Microsoft promotes Windows 11 as the future of computing, many people have recently downgraded to Windows 10 on their main PCs. Here's why it might actually be worth it to go back to an older operating system.

How to install free HEVC codecs on Windows 10 (for H.265 video)

How to install free HEVC codecs on Windows 10 (for H.265 video)

Microsoft charges for its official codecs and doesn't include them in Windows 10. However, you can get them for free without pulling out your credit card and spending $0.99.

How to hide the Taskbar on Windows 10 extremely easy

How to hide the Taskbar on Windows 10 extremely easy

When you move the mouse to the Taskbar, it displays all the functions as default when you have not set it up, but if you move the mouse elsewhere, the Taskbar will automatically hide.

How to download and update Bluetooth driver for Windows 10

How to download and update Bluetooth driver for Windows 10

Bluetooth makes our life smarter and more convenient, to avoid possible Bluetooth problems in Windows 10, such as Bluetooth not available, users should download and update Bluetooth driver for Windows 10 regularly.

How to Make Windows 11 Look Like Windows 10

How to Make Windows 11 Look Like Windows 10

If you miss the familiar look and feel of Windows 10, you can restore the Start menu, taskbar, and other familiar elements with a few simple tweaks.

6 Ways to Open Computer/System Properties in Windows 10

6 Ways to Open Computer/System Properties in Windows 10

You can use one of the following 6 methods to open Computer Properties (or System Properties) on Windows 10.

How to Open and Use MSConfig on Windows 10

How to Open and Use MSConfig on Windows 10

MSConfig is a versatile tool that is great for managing the startup process on your computer. It can also be used for more than just troubleshooting performance and stability issues.

6 Ways to Run Software with Administrator Rights in Windows

6 Ways to Run Software with Administrator Rights in Windows

Running some programs with administrator rights is often necessary for full functionality, especially for system tools or file editing and settings software.

How to fix BSOD Memory Management error

How to fix BSOD Memory Management error

Have you ever encountered the Windows Memory Management blue screen of death error? This common Windows Stop Code is annoying, but there are some simple fixes for Windows Memory Management errors.

Most people dont use these hidden features in Windows Security.

Most people dont use these hidden features in Windows Security.

Windows Security does more than just protect against basic viruses. It protects against phishing, blocks ransomware, and prevents malicious apps from running. However, these features aren't easy to spot—they're hidden behind layers of menus.

Follow these 7 steps to keep Windows 11 from slowing down again!

Follow these 7 steps to keep Windows 11 from slowing down again!

From deleting temporary files to updating software, there are many simple and effective ways to keep your computer running smoothly like new.

Heres how to create a virtual hard drive (Virtual Hard Disk) on Windows 10

Heres how to create a virtual hard drive (Virtual Hard Disk) on Windows 10

Basically, a Virtual Hard Disk (VHD) is a file format that contains structures that are “exactly” identical to the structure of a hard drive.

Why is there a lock icon on the drive and how to remove it?

Why is there a lock icon on the drive and how to remove it?

Wondering why there is a lock icon on a drive in File Explorer? This article explains what it is and how to remove the lock icon from a drive in Windows 10.

How to use SpeedFan to check CPU temperature and computer fan speed

How to use SpeedFan to check CPU temperature and computer fan speed

SpeedFan tool checks your computer's temperature, CPU usage, and fan speed so you can cool it down.

10 Great Windows Features That Many People Dont Use

10 Great Windows Features That Many People Dont Use

From killing frozen apps right on the taskbar to automatically locking your computer when you walk away, there are plenty of tools you'll wish you'd discovered sooner.

3 Tools You Need to Remove Windows 11 Tracking

3 Tools You Need to Remove Windows 11 Tracking

Don't completely trust the default settings when it comes to privacy. Windows 11 is no exception, as it often oversteps its bounds when it comes to data collection.

How to download Windows 10, download Windows 10 ISO file from Microsoft

How to download Windows 10, download Windows 10 ISO file from Microsoft

When downloading Windows 10 from Microsoft, you will download Windows 10 as an ISO file. From this Windows 10 ISO file, you can use it to create a bootable USB, a Windows installation USB, or a computer ghost. Let's see how to download Windows 10!

Windows 11 is about to let you transfer data from your old PC during setup — heres how

Windows 11 is about to let you transfer data from your old PC during setup — heres how

Microsoft will officially stop supporting Windows 10 in less than three months, which means millions of users will have to upgrade to new hardware to run Windows 11.

How to send password protected files without buying software

How to send password protected files without buying software

You don't need to spend a dime to secure your documents and other important data. Use trusted free apps to lock everything down and send it securely to anyone.

6 Free Tools That Tell You Your Hard Drive Is About to Fail

6 Free Tools That Tell You Your Hard Drive Is About to Fail

Several free tools can predict drive failures before they happen, giving you time to back up your data and replace the drive in time.

How to fix WHEA Uncorrectable Error on Windows 10/11

How to fix WHEA Uncorrectable Error on Windows 10/11

Blue screen errors, also known as blue screen of death, have been around for a long time on Windows. These errors contain important information related to the sudden crash of the system.