Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Add exclusions with caution. Exclusions for Microsoft Defender Antivirus reduce the level of protection for devices.
You can define exclusions for items you don't want Microsoft Defender Antivirus to scan. However, excluded items might contain threats that make your device vulnerable.
You shouldn't exclude the files, file types, folders, or processes described in this article from Microsoft Defender Antivirus scanning, even if you trust the items aren't malicious.
Prerequisites
Tip
Before you create exclusions, see the following articles:
Supported operating systems
- Windows
- macOS
- Linux
Folders
You shouldn't exclude some folders from scans, because attackers might use these folders. In general, don't define exclusions for the following folders:
Windows:
%systemdrive%C:,C:\, orC:\*%ProgramFiles%\JavaorC:\Program Files\JavaExample:
%ProgramFiles%\Contoso\,C:\Program Files\Contoso\,%ProgramFiles(x86)%\Contoso\, orC:\Program Files (x86)\Contoso\C:\Temp,C:\Temp\, orC:\Temp\*C:\Users\orC:\Users\*C:\Users\<UserProfileName>\AppData\Local\Temp\orC:\Users\<UserProfileName>\AppData\LocalLow\Temp\.Note
You should exclude the following folders when you use file-level antivirus protection in SharePoint:
C:\Users\ServiceAccount\AppData\Local\TemporC:\Users\Default\AppData\Local\Temp.%Windir%\Prefetch,C:\Windows\Prefetch,C:\Windows\Prefetch\, orC:\Windows\Prefetch\*%Windir%\System32\SpoolorC:\Windows\System32\SpoolC:\Windows\System32\CatRoot2%Windir%\Temp,C:\Windows\Temp,C:\Windows\Temp\, orC:\Windows\Temp\*
Linux and macOS:
//binor/sbin/usr/lib
File extensions
You shouldn't exclude some file extensions from scans, because attackers might use these types of files. In general, don't define exclusions for the following file extensions:
.7z.bat.bin.cab.cmd.com.cpl.dll.exe.fla.gif.gz.hta.inf.java.jar.job.jpeg.jpg.js.koor.ko.gz.msi.ocx.png.ps1.py.rar.reg.scr.sys.tar.tmp.url.vbe.vbs.wsf.zip
Note
You can choose to exclude file types (for example, .gif, .jpg, .jpeg, or .png) if your organization uses modern, up-to-date software with strict update policies to handle vulnerabilities.
Processes
You shouldn't exclude some processes from scans, because attackers might use these processes. In general, don't define exclusions for the following processes:
Windows:
AcroRd32.exeaddinprocess.exeaddinprocess32.exeaddinutil.exebash.exebginfo.exebitsadmin.execdb.execsi.execmd.execscript.exedbghost.exedbgsvc.exednx.exedotnet.exeexcel.exefsi.exefsiAnyCpu.exeiexplore.exejava.exekd.exelxssmanager.dllmsbuild.exemshta.exentkd.exentsd.exeoutlook.exepsexec.exepowerpnt.exepowershell.exercsi.exesvchost.exeschtasks.exesystem.management.automation.dllwindbg.exewinword.exewmic.exewscript.exewuauclt.exe
Linux and macOS:
bashjavapythonandpython3shzsh
Files without a location in exclusions
A malicious file might have the same name as a file you trust. To avoid excluding potentially malicious files from scanning, don't exclude the file only. Instead, include the fully qualified path with the file.
For example, don't exclude Filename.exe from scanning. Exclude the complete path and file: C:\Program Files\Contoso\Filename.exe.
A single exclusion list for multiple server workloads
Don't use a single exclusion list to define exclusions for multiple server workloads. Instead, split the exclusions into multiple lists for different apps or services.
For example, the use a different exclusion list for IIS than the exclusion list for SQL Server.
Incorrect environment variables as wildcards in exclusions
Don't use user environment variables as wildcards in folder and process exclusions in Microsoft Defender Antivirus. Only use the following types of environment variables as wildcards:
- System environment variables.
- Environment variables that apply to processes running as the NT AUTHORITY\SYSTEM account.
The Microsoft Defender Antivirus service runs in the system context using the LocalSystem account. The service gets information from system environment variables, not user environment variables.
For a complete list of system environment variables, see System environment variables.
For more information about how to use wildcards in exclusions, see Use wildcards in the file name and folder path or extension exclusion lists.