Open in the explorer

Extension Exclusions

Exclusions d’extensions

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_Extensions

Explanation

This policy setting allows you specify a list of file types that should be excluded from scheduled, custom, and real-time scanning. File types 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 the file type extension (such as "obj" or "lib"). 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 spécifier une liste de types de fichiers à exclure des analyses planifiées, personnalisées et en temps réel. Les types de fichiers 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 de l’extension de type de fichier (par exemple, « obj » ou « lib »). La valeur n’est pas utilisée et il est recommandé qu’elle soit égale à 0.

Use cases

Excludes file types (for example obj or lib) from scheduled, custom and real-time scans. An extension exclusion applies to every file with that extension, wherever it is: it is the broadest type of exclusion, and therefore the one that opens the largest attack surface (malware can simply adopt the excluded extension).

Microsoft points out that exclusions are generally not needed and reduce protection: use them only to fix a specific problem, review them regularly, and protect them with Tamper Protection. Each entry is a name/value pair: the name is the extension, the value is unused and should be set to 0.

Microsoft sources: Configure custom exclusions for Microsoft Defender Antivirus · Exclusions in Microsoft Defender Antivirus

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Exclusions
Value name
Exclusions_Extensions
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_Extensions
$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_Extensions' -Value 1 -Type DWord  # assumed value (not defined in the ADMX)
$k = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Exclusions\Extensions'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Extension 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_Extensions
$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_Extensions' -Value 0 -Type DWord  # assumed value (not defined in the ADMX)

Revert to "Not configured"

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

Options (1)

LabelControlRegistry valueREG typeConstraints / details
Extension ExclusionsExclusions d’extensionsExclusions_ExtensionsListList (table)listSoftware\Policies\Microsoft\Windows Defender\Exclusions\ExtensionsName = value pairs · additiveREG_SZ (values under the key)

Availability