Add or Remove Windows Defender Antivirus Exclusions in Windows 10  

Page 1 of 6 123 ... LastLast
    Add or Remove Windows Defender Antivirus Exclusions in Windows 10

    Add or Remove Windows Defender Antivirus Exclusions in Windows 10

    How to Add or Remove Exclusions for Windows Defender Antivirus in Windows 10
    Published by Category: Security System
    24 Mar 2020
    Designer Media Ltd


    How to Add or Remove Exclusions for Windows Defender Antivirus in Windows 10


    Windows Defender helps protect your PC against malware (malicious software) like viruses, spyware, and other potentially unwanted software. Malware can infect your PC without your knowledge: it might install itself from an email message, when you connect to the Internet, or when you install certain apps using a USB flash drive, CD, DVD, or other removable media. Some malware can also be programmed to run at unexpected times, not only when it's installed.

    Windows Defender is included with Windows and helps keep malware from infecting your PC in two ways:
    • Providing real-time protection. Windows Defender notifies you when malware tries to install itself or run on your PC. It also notifies you when apps try to change important settings.
    • Providing anytime scanning options. Windows Defender automatically scans your PC for installed malware on a regular basis, but you can also start a scan whenever you want. Windows Defender automatically removes (or temporarily quarantines) anything that's detected during a scan.

    If you like, you can add exclusions to Windows Defender for files, folders (file locations), file extensions (file types), and processes that you are confident are 100% safe and secure to reduce the scan time of Windows Defender.

    For example, a sandbox, ISO files, or virtual machines.

    This tutorial will show you how to add or remove exclusions to Windows Defender Antivirus for all users in Windows 10.

    You must be signed in as an administrator to be able to add or remove exclusions for Windows Defender.

    File and folder exclusions are stored in the registry key below.

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Exclusions\Paths

    File type exclusions are stored in the registry key below.

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Exclusions\Extensions

    Process exclusions are stored in the registry key below.

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Exclusions\Processes


    Windows Defender won't scan excluded files, so this can make your PC more vulnerable to malware.



    Contents

    • Option One: To Add an Exclusion to Windows Defender Antivirus in Windows Security
    • Option Two: To Remove an Exclusion from Windows Defender Antivirus in Windows Security
    • Option Three: To Add or Remove File Exclusion for Windows Defender Antivirus in PowerShell
    • Option Four: To Add or Remove Folder Exclusion for Windows Defender Antivirus in PowerShell
    • Option Five: To Add or Remove File Type Exclusion for Windows Defender Antivirus in PowerShell
    • Option Six: To Add or Remove Process Exclusion for Windows Defender Antivirus in PowerShell






    OPTION ONE

    To Add an Exclusion to Windows Defender Antivirus in Windows Security


    1 Open Windows Security, and click/tap on the Virus & threat protection icon. (see screenshot below)

    Add or Remove Windows Defender Antivirus Exclusions in Windows 10-windows_defender_exclusions-1.png

    2 Click/tap on the Manage settings link under Virus & threat protection settings. (see screenshot below)

    Add or Remove Windows Defender Antivirus Exclusions in Windows 10-windows_defender_exclusions-2.png

    3 Click/tap on the Add or remove exclusions link under Exclusions. (see screenshot below)

    Add or Remove Windows Defender Antivirus Exclusions in Windows 10-windows_defender_exclusions-3.png

    4 Click/tap on the Add an exclusion plus button, and do step 5 (file), step 6 (folder), step 7 (file type), or step 8 (process) below for what type of exclusion you want to add. (see screenshot below)

    Add or Remove Windows Defender Antivirus Exclusions in Windows 10-windows_defender_exclusions-4.png


    5 To Add a File Exclusion to Windows Defender Antivirus

    This option is to add a specific file as an exclusion to no longer be scanned by Windows Defender Antivirus.

    A) Click/tap on File under Add an exclusion. (see screenshot below step 4)

    B) Navigate to and select a file you want to exclude, click/tap on Open, and go to step 9 below. (see screenshot below)

    Add or Remove Windows Defender Antivirus Exclusions in Windows 10-windows_defender_file_exclusion.png


    6 To Add a Folder Exclusion to Windows Defender Antivirus

    This option is to add a folder as an exclusion to no longer have the folder and the files in the folder scanned by Windows Defender Antivirus.

    A) Click/tap on Folder under Add an exclusion. (see screenshot below step 4)

    B) Navigate to and select a folder you want to exclude, click/tap on Select folder, and go to step 9 below. (see screenshot below)

    Add or Remove Windows Defender Antivirus Exclusions in Windows 10-windows_defender_folder_exclusion.png


    7 To Add a File Type Exclusion to Windows Defender Antivirus

    This option is to add a file extension as an exclusion to no longer have all files with that file type scanned by Windows Defender Antivirus.

    A) Click/tap on File type under Add an exclusion. (see screenshot below step 4)

    B) Enter a file extension you want to exclude, click/tap on Add, and go to step 9 below. (see screenshot below)

    Add or Remove Windows Defender Antivirus Exclusions in Windows 10-windows_defender_file_type_exclusion.png


    8 To Add a Process Exclusion to Windows Defender Antivirus

    This option is to add a process as an exclusion to no longer have any file associated with it scanned by Windows Defender Antivirus.

    A) Click/tap on Process under Add an exclusion. (see screenshot below step 4)

    B) Enter a process name you want to exclude, click/tap on Add, and go to step 9 below. (see screenshot below)

    Add or Remove Windows Defender Antivirus Exclusions in Windows 10-windows_defender_process_exclusion.png

    9 Click/tap on Yes when prompted by UAC to approve.

    10 Repeat step 4 above if you would like to add another exclusion to Windows Defender.

    11 When finished, you can close Settings if you like.






    OPTION TWO

    To Remove an Exclusion from Windows Defender Antivirus in Windows Security


    1 Open Windows Security, and click/tap on the Virus & threat protection icon. (see screenshot below)

    Add or Remove Windows Defender Antivirus Exclusions in Windows 10-windows_defender_exclusions-1.png

    2 Click/tap on the Manage settings link under Virus & threat protection settings. (see screenshot below)

    Add or Remove Windows Defender Antivirus Exclusions in Windows 10-windows_defender_exclusions-2.png

    3 Click/tap on the Add or remove exclusions link under Exclusions. (see screenshot below)

    Add or Remove Windows Defender Antivirus Exclusions in Windows 10-windows_defender_exclusions-3.png

    4 Click/tap on an added exclusion that you want to remove, and click/tap on its Remove button. (see screenshot below)

    Add or Remove Windows Defender Antivirus Exclusions in Windows 10-windows_defender_remove_exclusions.png

    5 Click/tap on Yes when prompted by UAC to approve.

    6 Repeat step 4 above if you would like to remove another exclusion.

    7 When finished, you can close Settings if you like.






    OPTION THREE

    To Add or Remove File Exclusion for Windows Defender Antivirus in PowerShell


    This option is to add or remove a specific file as an exclusion to no longer be scanned by Windows Defender Antivirus.


    1 Open an elevated PowerShell.

    2 Type the command you want to use below into the elevated PowerShell, and press Enter. (see screenshots below)

    (Add file exclusion)
    Add-MpPreference -ExclusionPath "<Full path of file>" -Force

    OR

    (Remove file exclusion)
    Remove-MpPreference -ExclusionPath "<Full path of file>" -Force

    Substitute <Full path of file> in the commands above with the actual full path of the file (ex: "C:\Windows\notepad.exe") you want to add or remove as an exclusion.


    3 You can now close the elevated PowerShell if you like.

    Add or Remove Windows Defender Antivirus Exclusions in Windows 10-add_windows_defender_file_exclusion_powershell.png Add or Remove Windows Defender Antivirus Exclusions in Windows 10-remove_windows_defender_file_exclusion_powershell.png






    OPTION FOUR

    To Add or Remove Folder Exclusion for Windows Defender Antivirus in PowerShell


    This option is to add or remove a folder as an exclusion to no longer have the folder and the files in the folder scanned by Windows Defender Antivirus.


    1 Open an elevated PowerShell.

    2 Type the command you want to use below into the elevated PowerShell, and press Enter. (see screenshots below)

    (Add folder exclusion)
    Add-MpPreference -ExclusionPath "<Full path of folder>" -Force

    OR

    (Remove folder exclusion)
    Remove-MpPreference -ExclusionPath "<Full path of folder>" -Force

    Substitute <Full path of folder> in the commands above with the actual full path of the folder (ex: "C:\Users\Brink\Pictures") you want to add or remove as an exclusion.


    3 You can now close the elevated PowerShell if you like.

    Add or Remove Windows Defender Antivirus Exclusions in Windows 10-add_windows_defender_folder_exclusion_powershell.png Add or Remove Windows Defender Antivirus Exclusions in Windows 10-remove_windows_defender_folder_exclusion_powershell.png






    OPTION FIVE

    To Add or Remove File Type Exclusion for Windows Defender Antivirus in PowerShell


    This option is to add or remove a file extension as an exclusion to no longer have all files with that file type scanned by Windows Defender Antivirus.


    1 Open an elevated PowerShell.

    2 Type the command you want to use below into the elevated PowerShell, and press Enter. (see screenshots below)

    (Add file type exclusion)
    Add-MpPreference -ExclusionExtension "<File type extension>" -Force

    OR

    (Remove file type exclusion)
    Remove-MpPreference -ExclusionExtension "<File type extension>" -Force

    Substitute <File type extension> in the commands above with the actual file type extension (ex: ".jpg") you want to add or remove as an exclusion.


    3 You can now close the elevated PowerShell if you like.

    Add or Remove Windows Defender Antivirus Exclusions in Windows 10-add_windows_defender_file_type_exclusion_powershell.png Add or Remove Windows Defender Antivirus Exclusions in Windows 10-remove_windows_defender_file_type_exclusion_powershell.png






    OPTION SIX

    To Add or Remove Process Exclusion for Windows Defender Antivirus in PowerShell


    This option is to add or remove a process as an exclusion to no longer have any file associated with it scanned by Windows Defender Antivirus.


    1 Open an elevated PowerShell.

    2 Type the command you want to use below into the elevated PowerShell, and press Enter. (see screenshots below)

    (Add process exclusion)
    Add-MpPreference -ExclusionProcess "<Process name>" -Force

    OR

    (Remove process exclusion)
    Remove-MpPreference -ExclusionProcess "<Process name>" -Force

    Substitute <Process name> in the commands above with the actual process name (ex: "SecHealthUI.exe") you want to add or remove as an exclusion.


    3 You can now close the elevated PowerShell if you like.

    Add or Remove Windows Defender Antivirus Exclusions in Windows 10-add_windows_defender_process_exclusion_powershell.png Add or Remove Windows Defender Antivirus Exclusions in Windows 10-remove_windows_defender_process_exclusion_powershell.png


    That's it,
    Shawn



  1. f14tomcat's Avatar
    Posts : 47,487
    Triple boot - Win 10 Pro, Win 10 Pro Insider (2) - (and a sprinkling of VMs)
       #1

    @Brink - Shawn, this is a good one to know, and I would add one thing. The "Why would I want to do this?".

    Files and folders (including whole external drives or partitions, etc.) may be obvious, but excluding a process may not be.

    The process you chose for this tutorial (MBAM) is a perfect example. Malwarebytes scanner is a well used and trusted anti-malware product. I cut the run time of a full scan using MBAM w/Def exclusion by about 50%... 18 mins to 9 mins. Windows Defender did did not have to monitor a trusted process. This can be seen by running Task Manager and monitoring the MsMpEng.exe.

    It would be wise to point out, though, to not take this option too far! Only use it in cases where you are comfortable and know the risk level is extremely low. Example: DO NOT add Spartan.exe as an exclusion!

    Thanks for the Tut!
      My Computers

  2. Brink's Avatar
    Posts : 48,966
    64-bit Windows 10 Pro for Workstations build 19640
    Thread Starter
       #2

    @f14tomcat

    Good point Dick. I added a note to the tutorial for that. :)
      My Computers


  3. Posts : 14
    7
       #3

    Would anyone know if path exclusion is recursive? Also is there a way to specify wildcards?
      My Computer

  4. Brink's Avatar
    Posts : 48,966
    64-bit Windows 10 Pro for Workstations build 19640
    Thread Starter
       #4

    Hello Biatche, :)

    If you exclude a "File location", then WD will exclude all files and subfolders on that location.

    I don't believe you can use wildcards, but if you add a "File type" exclusion, then all file types with that extension will be excluded.
      My Computers


  5. Posts : 39
    Windows 10
       #5

    Hello Brink,

    I was wondering if you can help me please.

    I have selected certain file types / folders and locations in Windows Defender on Windows 10 that were added to the exclusions lists...

    Previously I could go to Windows Defender and see what files, folders or extensions I had excluded but now they have disappeared....

    All I see is the add buttons which work as intended when I want to add a folder etc etc....
    But then they are not listed anywhere so that I can remember what I have excluded or not....

    Can some one please help me so that they are visible again, is there a setting in the registry that needs to be fixed?

    This is what I should see where, below the red arrows I should see the excluded files/folders including their path etc etc [see image below]

    but I see nothing..

    Yet if i go to the registry as indicated below...

    File and file location exclusions are stored in the registry key below.

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Exclusions\Paths

    File type exclusions are stored in the registry key below.

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Exclusions\Extensions

    Processes exclusions are stored in the registry key below.

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Exclusions\Processes

    they are all listed there....?

    I have to say that windows defender is excluding folders/files and etc etc, that I have selected during its scans, but I cant see the excluded items in the Windows Defender as per image of my Exclusions section below...



    Thanking you in advance for your support and assistance on this issue....

    Cheers
    Last edited by Brink; 29 Sep 2017 at 17:26.
      My Computer

  6. Brink's Avatar
    Posts : 48,966
    64-bit Windows 10 Pro for Workstations build 19640
    Thread Starter
       #6

    Hello Kokakola, :)

    The only way that I know of to add them back is to delete them in the registry, and manually add the exceptions back in Settings.

    I'd recommend to export the Exclusions key first to be able to use it as a reference to help add all of the exceptions back.
      My Computers



  7. Posts : 39
    Windows 10
       #7

    Brink said:
    Hello Kokakola, :)

    The only way that I know of to add them back is to delete them in the registry, and manually add the exceptions back in Settings.

    I'd recommend to export the Exclusions key first to be able to use it as a reference to help add all of the exceptions back.
    Hhello BRINK,

    I have already done that in the registry and re entered them again but they still refuse to show up in the section under exclusions... is it that the settings in the registry are set wrong?

    mine all have value not set? is this the issue...
      My Computer

  8. Brink's Avatar
    Posts : 48,966
    64-bit Windows 10 Pro for Workstations build 19640
    Thread Starter
       #8

    Just to verify, you re-entered them in Settings and not from the registry?

    Go ahead and restart the computer, and see if you are able to enter them in Settings and have them show.

    Please aslo post a screenshot showing what you see in Settings to see if it may reveal anything.
      My Computers


  9. Posts : 39
    Windows 10
       #9

    Brink said:
    Just to verify, you re-entered them in Settings and not from the registry?

    Go ahead and restart the computer, and see if you are able to enter them in Settings and have them show.

    Please aslo post a screenshot showing what you see in Settings to see if it may reveal anything.
    I have done as you advised but still no go...

    as you can see from the images attached i see the exclusions listed in the registry but they wont show up on windows defender...

    has it anything to do with the fact that the registry values are not set?
    as shown in the images attached...
    thanks in advance...
    Add or Remove Windows Defender Antivirus Exclusions in Windows 10-registry-windows-defender-exclusions-list.jpgAdd or Remove Windows Defender Antivirus Exclusions in Windows 10-windows-defender-exclusions-list.jpg
      My Computer


 

Tutorial Categories

Add or Remove Windows Defender Antivirus Exclusions in Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


Related Threads
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 05:10.
Find Us




Windows 10 Forums