Activer la mise en cache transparente
Vérifié avec Windows 11 25H2 — mis à jour le 30 juillet 2026
Pris en charge sur : Au minimum Windows Server 2008 R2 ou Windows 7
Chemin dans la console GPO
Configuration ordinateur\Modèles d'administration\Réseau\Fichiers hors connexion Description
Ce paramètre de stratégie détermine si les fichiers lus à partir de partages de fichiers sur un réseau lent sont mis en cache de manière transparente dans le cache des fichiers hors connexion pour des opérations de lecture ultérieure. Lorsqu’un utilisateur tente d’accéder à un fichier mis en cache de manière transparente, Windows lit la copie mise en cache après s’être assuré de son intégrité. Cela permet d’améliorer les temps de réponse de l’utilisateur final et de réduire la consommation de bande passante sur des liaisons réseau étendu. Les fichiers mis en cache sont temporaires et les utilisateurs ne peuvent pas y accéder lorsqu’ils sont hors connexion. Les fichiers mis en cache ne restent pas synchronisés avec la version figurant sur le serveur et il est toujours possible de lire ultérieurement la version la plus récente sur le serveur. Ce paramètre de stratégie est déclenché par la valeur configurée de temps de réponse du réseau aller-retour. Il est recommandé d’utiliser ce paramètre de stratégie lorsque la connexion réseau au serveur est lente. Par exemple, vous pouvez configurer une valeur de temps de réponse du réseau aller-retour de 60 ms au-delà de laquelle les fichiers seront mis en cache de façon transparente dans le cache des fichiers hors connexion. Si le temps de réponse du réseau aller-retour est inférieur à 60 ms, les lectures des fichiers distants ne seront pas mises en cache. Si vous activez ce paramètre de stratégie, la mise en cache de manière transparente est activée et configurable. Si vous désactivez ou ne configurez pas ce paramètre de stratégie, les fichiers distants ne sont pas mis en cache de façon transparente sur les ordinateurs client.
Registre
Software\Policies\Microsoft\Windows\NetCache MDM / Intune (CSP)
./Device/Vendor/MSFT/Policy/Config/ADMX_OfflineFiles/Pol_OnlineCachingSettings Documentation Microsoft Learn Données de correspondance : Microsoft Learn (CC BY 4.0)
Générateur d'exports
BETAConfigurez l'état, la portée et les options, puis générez les sorties .reg, PowerShell, Intune et SCCM — ou ajoutez le paramètre à une collection multi-paramètres.
Ces exports écrivent le registre — ce n'est pas une GPO managée. ⓘ
Fichier .reg
Windows Registry Editor Version 5.00
; Exported from gporais.com
; Policy: Activer la mise en cache transparente
; State: Enabled
; Supported on: Au minimum Windows Server 2008 R2 ou Windows 7
[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\NetCache]
"OnlineCachingLatencyThreshold"=dword:00007d00 Autres formats (PowerShell, Intune, SCCM)
PowerShell
# Exported from gporais.com
# Policy: Activer la mise en cache transparente
# State: Enabled
# Supported on: Au minimum Windows Server 2008 R2 ou Windows 7
$path = 'HKLM:\Software\Policies\Microsoft\Windows\NetCache'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'OnlineCachingLatencyThreshold' -Value 32000 -Type DWord Intune XML
OMA-URI: ./Device/Vendor/MSFT/Policy/Config/ADMX_OfflineFiles/Pol_OnlineCachingSettings
Data type: String
Value:
<enabled/>
<data id="Lbl_OnlineCachingSettingsList" value="32000"/> Intune Remediation
# === Detection script ===
# Exported from gporais.com
# Policy: Activer la mise en cache transparente
# State: Enabled
# Supported on: Au minimum Windows Server 2008 R2 ou Windows 7
function Test-RegistryValue {
param(
[Parameter(Mandatory = $true)][string]$Path,
[Parameter(Mandatory = $true)][string]$Name,
[object]$Expected,
[ValidateSet('String', 'DWord', 'MultiString')][string]$Kind = 'String',
[switch]$Absent
)
try {
$item = Get-ItemProperty -LiteralPath $Path -Name $Name -ErrorAction Stop
} catch {
return $Absent.IsPresent
}
if ($Absent.IsPresent) { return $false }
$actual = $item.$Name
if ($Kind -eq 'DWord') { return ([int64]$actual) -eq ([int64]$Expected) }
if ($Kind -eq 'MultiString') {
$actualValues = @($actual)
$expectedValues = @($Expected)
if ($actualValues.Count -ne $expectedValues.Count) { return $false }
for ($i = 0; $i -lt $expectedValues.Count; $i++) {
if ([string]$actualValues[$i] -ne [string]$expectedValues[$i]) { return $false }
}
return $true
}
return [string]$actual -eq [string]$Expected
}
$checks = @(
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\NetCache' -Name 'OnlineCachingLatencyThreshold' -Expected 32000 -Kind DWord)
)
if ($checks -notcontains $false) {
Write-Output 'Compliant'
exit 0
}
Write-Output 'Non-compliant'
exit 1
# === Remediation script ===
# Exported from gporais.com
# Policy: Activer la mise en cache transparente
# State: Enabled
# Supported on: Au minimum Windows Server 2008 R2 ou Windows 7
$path = 'HKLM:\Software\Policies\Microsoft\Windows\NetCache'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'OnlineCachingLatencyThreshold' -Value 32000 -Type DWord Scripts SCCM
# Exported from gporais.com
# Policy: Activer la mise en cache transparente
# State: Enabled
# Supported on: Au minimum Windows Server 2008 R2 ou Windows 7
# SCCM Configuration Item guidance:
# Create a Configuration Item of type "Setting: Script".
# Discovery script: use the Detection script below.
# Remediation script: use the Remediation script below.
# Compliance rule: the Discovery script output equals 'Compliant'.
# === Detection script ===
# Exported from gporais.com
# Policy: Activer la mise en cache transparente
# State: Enabled
# Supported on: Au minimum Windows Server 2008 R2 ou Windows 7
function Test-RegistryValue {
param(
[Parameter(Mandatory = $true)][string]$Path,
[Parameter(Mandatory = $true)][string]$Name,
[object]$Expected,
[ValidateSet('String', 'DWord', 'MultiString')][string]$Kind = 'String',
[switch]$Absent
)
try {
$item = Get-ItemProperty -LiteralPath $Path -Name $Name -ErrorAction Stop
} catch {
return $Absent.IsPresent
}
if ($Absent.IsPresent) { return $false }
$actual = $item.$Name
if ($Kind -eq 'DWord') { return ([int64]$actual) -eq ([int64]$Expected) }
if ($Kind -eq 'MultiString') {
$actualValues = @($actual)
$expectedValues = @($Expected)
if ($actualValues.Count -ne $expectedValues.Count) { return $false }
for ($i = 0; $i -lt $expectedValues.Count; $i++) {
if ([string]$actualValues[$i] -ne [string]$expectedValues[$i]) { return $false }
}
return $true
}
return [string]$actual -eq [string]$Expected
}
$checks = @(
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\NetCache' -Name 'OnlineCachingLatencyThreshold' -Expected 32000 -Kind DWord)
)
if ($checks -notcontains $false) {
Write-Output 'Compliant'
exit 0
}
Write-Output 'Non-compliant'
exit 1
# === Remediation script ===
# Exported from gporais.com
# Policy: Activer la mise en cache transparente
# State: Enabled
# Supported on: Au minimum Windows Server 2008 R2 ou Windows 7
$path = 'HKLM:\Software\Policies\Microsoft\Windows\NetCache'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'OnlineCachingLatencyThreshold' -Value 32000 -Type DWord Vous construisez une collection multi-paramètres ? Ajoutez ce paramètre et générez des exports combinés (.reg, PowerShell, GPO).