Limit disk space used by Offline Files
Limiter l’espace disque utilisé par les fichiers hors connexion
Explanation
This policy setting limits the amount of disk space that can be used to store offline files. This includes the space used by automatically cached files and files that are specifically made available offline. Files can be automatically cached if the user accesses a file on an automatic caching network share.
This setting also disables the ability to adjust, through the Offline Files control panel applet, the disk space limits on the Offline Files cache. This prevents users from trying to change the option while a policy setting controls it.
If you enable this policy setting, you can specify the disk space limit (in megabytes) for offline files and also specify how much of that disk space can be used by automatically cached files.
If you disable this policy setting, the system limits the space that offline files occupy to 25 percent of the total space on the drive where the Offline Files cache is located. The limit for automatically cached files is 100 percent of the total disk space limit.
If you do not configure this policy setting, the system limits the space that offline files occupy to 25 percent of the total space on the drive where the Offline Files cache is located. The limit for automatically cached files is 100 percent of the total disk space limit. However, the users can change these values using the Offline Files control applet.
If you enable this setting and specify a total size limit greater than the size of the drive hosting the Offline Files cache, and that drive is the system drive, the total size limit is automatically adjusted downward to 75 percent of the size of the drive. If the cache is located on a drive other than the system drive, the limit is automatically adjusted downward to 100 percent of the size of the drive.
If you enable this setting and specify a total size limit less than the amount of space currently used by the Offline Files cache, the total size limit is automatically adjusted upward to the amount of space currently used by offline files. The cache is then considered full.
If you enable this setting and specify an auto-cached space limit greater than the total size limit, the auto-cached limit is automatically adjusted downward to equal the total size limit.
This setting replaces the Default Cache Size setting used by pre-Windows Vista systems.
Ce paramètre de stratégie limite la quantité d’espace disque utilisable pour stocker des fichiers hors connexion. Cette quantité tient compte de l’espace utilisé par les fichiers automatiquement mis en cache et les fichiers expressément rendus disponibles hors connexion. Les fichiers peuvent être automatiquement mis en cache si l’utilisateur accède à un fichier sur un partage réseau de mise en cache automatique.
Ce paramètre désactive également la possibilité d’ajuster les limites d’espace disque du cache des fichiers hors connexion dans l’applet Fichiers hors connexion du Panneau de configuration. Ainsi, les utilisateurs ne peuvent pas modifier l’option si un paramètre de stratégie la gère.
Si vous activez ce paramètre de stratégie, vous pouvez spécifier la limite d’espace disque (en mégaoctets) pour les fichiers hors connexion, ainsi que la quantité utilisable par les fichiers mis en cache automatiquement.
Si vous désactivez ce paramètre de stratégie, le système limite l’espace occupé par les fichiers hors connexion à 25 pour cent de l’espace total du lecteur où se trouve le cache des fichiers hors connexion. La limite pour les fichiers mis en cache automatiquement est 100 pour cent de la limite d’espace disque total.
Si vous ne configurez pas ce paramètre de stratégie, le système limite l’espace occupé par les fichiers hors connexion à 25 pour cent de l’espace total du lecteur où se trouve le cache des fichiers hors connexion. La limite pour les fichiers mis en cache automatiquement est 100 pour cent de la limite d’espace disque total. Toutefois, les utilisateurs peuvent modifier ces valeurs à l’aide de l’applet Fichiers hors connexion du Panneau de configuration.
Si vous activez ce paramètre et spécifiez une limite de taille totale supérieure à la taille du lecteur hébergeant le cache des fichiers hors connexion alors que ce lecteur est le lecteur système, la limite de taille totale est automatiquement ajustée vers le bas à 75 pour cent de la taille du lecteur. Si le cache est situé sur un lecteur autre que le lecteur système, la limite est automatiquement ajustée vers le bas à 100 pour cent de la taille du lecteur.
Si vous activez ce paramètre et spécifiez une limite de taille totale inférieure à l’espace actuellement utilisé par le cache des fichiers hors connexion, la limite de taille totale est automatiquement ajustée vers le haut à la quantité d’espace actuellement utilisée par les fichiers hors connexion. Le cache est alors considéré comme « plein ».
Si vous activez ce paramètre et spécifiez une limite de l’espace en cache automatique supérieure à la limite de taille totale, la limite de l’espace en cache automatique est automatiquement ajustée vers le bas à la limite de taille totale.
Ce paramètre remplace le paramètre Taille du cache par défaut des systèmes antérieurs à Windows Vista.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\NetCache- 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: OfflineFiles/Pol_CacheSize
$k = 'HKLM:\Software\Policies\Microsoft\Windows\NetCache'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Total size of offline files
Set-ItemProperty -Path $k -Name 'CacheQuotaLimit' -Value 1000 -Type DWord # maximum 100000000
# Size of auto-cached files
Set-ItemProperty -Path $k -Name 'CacheQuotaLimitUnpinned' -Value 100 -Type DWord # maximum 100000000Disable
# Disable: OfflineFiles/Pol_CacheSize
# No value is written in the "Disabled" state (nothing defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": OfflineFiles/Pol_CacheSize
$k = 'HKLM:\Software\Policies\Microsoft\Windows\NetCache'
Remove-ItemProperty -Path $k -Name 'CacheQuotaLimit' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'CacheQuotaLimitUnpinned' -ErrorAction SilentlyContinueOptions (2)
| Label | Control | Registry value | REG type | Constraints / details |
|---|---|---|---|---|
| Total size of offline files:Taille totale des fichiers hors connexion :Lbl_TotalCacheSizeSpin | Numeric boxdecimal | CacheQuotaLimit | REG_DWORD | Max: 100000000 · Default (UI): 1000 |
| Size of auto-cached files:Taille des fichiers en cache automatique :Lbl_AutoCacheSizeSpin | Numeric boxdecimal | CacheQuotaLimitUnpinned | REG_DWORD | Max: 100000000 · Default (UI): 100 |