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
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.
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 10000Disable
# 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 SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / 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_DataDuplicationLocalRetentionPeriod | Numeric boxdecimal | DataDuplicationLocalRetentionPeriod | REG_DWORD | Required · Min: 0 · Max: 10000 · Default (UI): 60 |