Open in the explorer

Set the retention period for files in the local device control cache

Définir la période de rétention des fichiers dans le cache de contrôle de l’appareil local

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Windows Components › Microsoft Defender Antivirus › Device Control FR: Configuration ordinateur › Stratégies › Modèles d'administration › Composants Windows › Antivirus Microsoft Defender › Contrôle de périphérique
Supported on
At least Windows Server 2016, Windows 10 Version 1607 FR: Windows Server 2016, Windows 10 version 1607 ou versions supérieures
ADMX file
WindowsDefender.admx
Internal name
WindowsDefender/DeviceControl_DataDuplicationLocalRetentionPeriod

Explanation

This policy setting determines how long device control retains files for evidence in its local cache on the device. Device control keeps a file in its local cache only if it is unable to upload the file to a designated network share or Azure storage.

By default, device control retains files in its local cache for 60 days.

French text from Windows 11 26H2

Ce paramètre de stratégie détermine la durée pendant laquelle le contrôle de périphérique conserve les fichiers à des fins de preuve dans son cache local sur l’appareil. Le contrôle d’appareil conserve un fichier dans son cache local uniquement s’il ne peut pas charger le fichier vers un partage réseau ou un stockage Azure désigné.

Par défaut, le contrôle de périphérique conserve les fichiers dans son cache local pendant 60 jours.

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Device Control
Value name
not defined in the ADMX

Enable / disable values: not 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.

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/DeviceControl_DataDuplicationLocalRetentionPeriod
$k = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Device Control'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Set the retention period for files in the local device control cache
Set-ItemProperty -Path $k -Name 'DataDuplicationLocalRetentionPeriod' -Value 60 -Type DWord  # between 0 and 10000

Disable

# Disable: WindowsDefender/DeviceControl_DataDuplicationLocalRetentionPeriod
# No value is written in the "Disabled" state (nothing defined in the ADMX)

Revert to "Not configured"

# Revert to "Not configured": WindowsDefender/DeviceControl_DataDuplicationLocalRetentionPeriod
$k = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Device Control'
Remove-ItemProperty -Path $k -Name 'DataDuplicationLocalRetentionPeriod' -ErrorAction SilentlyContinue

Options (1)

LabelControlRegistry valueREG typeConstraints / details
Set the retention period for files in the local device control cacheDéfinir la période de rétention des fichiers dans le cache de contrôle de l’appareil localDeviceControl_DataDuplicationLocalRetentionPeriodNumeric boxdecimalDataDuplicationLocalRetentionPeriodREG_DWORD
Required · Min: 0 · Max: 10000 · Default (UI): 60

Availability

Windows 11

✓ 26H2✓ 25H2✓ 24H2— 23H2— 22H2— 21H2

Windows 10

— 22H2— 21H2— 21H1— 20H2— 2004— 1909— 1903— 1809— 1803— 1709— 1703— 1607— 1511— 1507

Windows Server

✓ 2025— 2022— 2016