Open in the explorer

Path Exclusions

Exclusions de chemins d’accès

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Windows Components › Microsoft Defender Antivirus › Exclusions FR: Configuration ordinateur › Stratégies › Modèles d'administration › Composants Windows › Antivirus Microsoft Defender › Exclusions
Supported on
At least Windows Server 2012, Windows 8 or Windows RT FR: Au minimum Windows Server 2012, Windows 8 ou Windows RT
ADMX file
WindowsDefender.admx
Internal name
WindowsDefender/Exclusions_Paths

Explanation

This policy setting allows you to disable scheduled and real-time scanning for files under the paths specified or for the fully qualified resources specified. Paths should be added under the Options for this setting. Each entry must be listed as a name value pair, where the name should be a string representation of a path or a fully qualified resource name. As an example, a path might be defined as: "c:\Windows" to exclude all files in this directory. A fully qualified resource name might be defined as: "C:\Windows\App.exe". The value is not used and it is recommended that this be set to 0.

French text from Windows 11 26H2

Ce paramètre de stratégie vous permet de désactiver les analyses planifiées et en temps réel pour les fichiers sous les chemins d’accès spécifiés ou pour les noms de ressources complets spécifiés. Les chemins d’accès doivent être ajoutés sous Options pour ce paramètre. Chaque entrée doit être répertoriée en tant que paire nom/valeur, où le nom doit être une représentation sous forme de chaîne d’un chemin d’accès ou d’un nom de ressource complet. Par exemple, un chemin d’accès peut être défini en tant que « c:\Windows » pour exclure tous les fichiers de ce répertoire. Un nom de ressource complet peut être défini en tant que « C:\Windows\App.exe ». La valeur n’est pas utilisée et il est recommandé qu’elle soit égale à 0.

Use cases

A list of paths excluded from scheduled and real-time scans. In practice it is used for heavy application workloads (databases, backups) when the vendor recommends it, to avoid slowdowns.

Every exclusion creates a blind spot: keep the list short, precise (no whole drives) and documented, and prefer paths recommended by the vendor.

Microsoft sources: Use Group Policy settings to configure and manage Microsoft Defender Antivirus · Microsoft Defender Antivirus exclusions overview

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Exclusions
Value name
Exclusions_Paths
StateValue written
Enablednot defined in the ADMX (see the options below)
Disablednot defined in the ADMX (see the options below)

PowerShell

PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.

The ADMX does not specify the value written when enabled; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled). The commands below use 1/0 as an assumption.

Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.

Enable

# Enable: WindowsDefender/Exclusions_Paths
$k = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Exclusions'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'Exclusions_Paths' -Value 1 -Type DWord  # assumed value (not defined in the ADMX)
$k = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Exclusions\Paths'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Path Exclusions
$items = @{
    '<name1>' = '<value1>'
    '<name2>' = '<value2>'
}  # Replace the values with your own
$items.GetEnumerator() | ForEach-Object { Set-ItemProperty -Path $k -Name $_.Key -Value $_.Value -Type String }

Disable

# Disable: WindowsDefender/Exclusions_Paths
$k = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Exclusions'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'Exclusions_Paths' -Value 0 -Type DWord  # assumed value (not defined in the ADMX)

Revert to "Not configured"

# Revert to "Not configured": WindowsDefender/Exclusions_Paths
$k = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Exclusions'
Remove-ItemProperty -Path $k -Name 'Exclusions_Paths' -ErrorAction SilentlyContinue
$k = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Exclusions\Paths'
Remove-Item -Path $k -Recurse -Force -ErrorAction SilentlyContinue

Options (1)

LabelControlRegistry valueREG typeConstraints / details
Path ExclusionsExclusions de chemins d’accèsExclusions_PathsListList (table)listSoftware\Policies\Microsoft\Windows Defender\Exclusions\PathsName = value pairs · additiveREG_SZ (values under the key)

Availability