Open in the explorer

Limit the age of files in the BITS Peercache

Limiter l’ancienneté des fichiers dans le cache partagé entre systèmes homologues BITS

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Network › Background Intelligent Transfer Service (BITS) FR: Configuration ordinateur › Stratégies › Modèles d'administration › Réseau › Service de transfert intelligent en arrière-plan (BITS)
Supported on
At least Windows Vista FR: Au minimum Windows Vista
ADMX file
Bits.admx
Internal name
Bits/BITS_MaxContentAge

Explanation

This policy setting limits the maximum age of files in the Background Intelligent Transfer Service (BITS) peer cache. In order to make the most efficient use of disk space, by default BITS removes any files in the peer cache that have not been accessed in the past 90 days.

If you enable this policy setting, you can specify in days the maximum age of files in the cache. You can enter a value between 1 and 120 days.

If you disable or do not configure this policy setting, files that have not been accessed for the past 90 days will be removed from the peer cache.

Note: This policy setting has no effect if the "Allow BITS Peercaching" policy setting is disabled or not configured.

French text from Windows 11 26H2

Ce paramètre de stratégie indique l’âge maximal des fichiers du cache partagé entre systèmes homologues BITS. Par défaut, et afin d’optimiser l’utilisation de l’espace disque, le service BITS supprime du cache partagé entre systèmes homologues les fichiers n’ayant pas été ouverts durant les derniers 90 jours.

Si vous activez ce paramètre de stratégie, vous pouvez spécifier l’âge maximal des fichiers dans le cache. La valeur doit être comprise entre 1 et 120 jours.

Si vous désactivez ou ne configurez pas ce paramètre de stratégie, les fichiers n’ayant pas été ouverts durant les derniers 90 jours sont supprimés du cache partagé entre systèmes homologues.

Remarque : ce paramètre de stratégie n’a aucune incidence si le paramètre de stratégie « Autoriser la mise en cache partagé entre systèmes homologues BITS » est désactivé ou n’est pas configuré.

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\BITS
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: Bits/BITS_MaxContentAge
$k = 'HKLM:\Software\Policies\Microsoft\Windows\BITS'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Number of days
Set-ItemProperty -Path $k -Name 'MaxContentAge' -Value 90 -Type DWord  # between 1 and 120

Disable

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

Revert to "Not configured"

# Revert to "Not configured": Bits/BITS_MaxContentAge
$k = 'HKLM:\Software\Policies\Microsoft\Windows\BITS'
Remove-ItemProperty -Path $k -Name 'MaxContentAge' -ErrorAction SilentlyContinue

Options (1)

LabelControlRegistry valueREG typeConstraints / details
Number of days:Nombre de jours :BITS_MaxContentAgeListNumeric boxdecimalMaxContentAgeREG_DWORD
Required · Min: 1 · Max: 120 · Default (UI): 90

Availability