Chiffrer le cache des fichiers hors connexion
Vérifié avec Windows 11 25H2 — mis à jour le 30 juillet 2026
Pris en charge sur : Au minimum Windows Server 2003 Service Pack 1, Windows XP Professionnel Service Pack 2 ou Windows 2000 Service Pack 5
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 hors connexion sont chiffrés. Les fichiers hors connexion sont des copies dans un cache local de fichiers provenant d’un partage réseau. En chiffrant ce cache, vous limitez la probabilité qu’un utilisateur puisse accéder aux fichiers à partir d’un cache de fichiers hors connexion sans les autorisations requises. Si vous activez ce paramètre de stratégie, tous les fichiers se trouvant dans le cache des fichiers hors connexion sont chiffrés. Cela inclut les fichiers existant aussi bien que les fichiers ajoutés ultérieurement. La copie mise en cache sur l’ordinateur local est affectée, ce qui n’est pas le cas de celle qui se trouve sur le réseau associé. L’utilisateur ne peut pas déchiffrer les fichiers hors connexion via l’interface utilisateur. Si vous désactivez ce paramètre de stratégie, tous les fichiers se trouvant dans le cache des fichiers hors connexion sont déchiffrés. Cela inclut les fichiers existants, ainsi que ceux qui ont été ajoutés ultérieurement, et ce, même si les fichiers étaient stockés sur le serveur via le chiffrement NTFS ou le chiffrement de lecteur BitLocker. La copie mise en cache sur l’ordinateur local est affectée, ce qui n’est pas le cas de celle qui se trouve sur le réseau associé. L’utilisateur ne peut pas chiffrer les fichiers hors connexion par le biais de l’interface utilisateur. Si vous ne configurez pas ce paramètre de stratégie, le chiffrement du cache des fichiers hors connexion est contrôlé par l’utilisateur via l’interface utilisateur. L’état en cours du cache est conservé, et si le cache n’est que partiellement chiffré, l’opération se termine afin qu’il soit entièrement chiffré. Le cache ne reviendra pas à un état déchiffré. L’utilisateur doit être administrateur sur l’ordinateur local pour pouvoir chiffrer ou déchiffrer le cache des fichiers hors connexion. Remarque : par défaut, ce cache est protégé sur les partitions NTFS par les listes de contrôle d’accès (ACL, access-control list). Ce paramètre est appliqué lorsque l’utilisateur ouvre une session. Si vous modifiez ce paramètre lorsque l’utilisateur a ouvert une session, il doit fermer la session et la rouvrir pour que le paramètre prenne effet.
Registre
Software\Policies\Microsoft\Windows\NetCache Nom de valeur : EncryptCache
Activé : EncryptCache = 1
Désactivé : EncryptCache = 0
MDM / Intune (CSP)
./Device/Vendor/MSFT/Policy/Config/ADMX_OfflineFiles/Pol_EncryptOfflineFiles 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: Chiffrer le cache des fichiers hors connexion
; State: Enabled
; Supported on: Au minimum Windows Server 2003 Service Pack 1, Windows XP Professionnel Service Pack 2 ou Windows 2000 Service Pack 5
[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\NetCache]
"EncryptCache"=dword:00000001 Autres formats (PowerShell, Intune, SCCM)
PowerShell
# Exported from gporais.com
# Policy: Chiffrer le cache des fichiers hors connexion
# State: Enabled
# Supported on: Au minimum Windows Server 2003 Service Pack 1, Windows XP Professionnel Service Pack 2 ou Windows 2000 Service Pack 5
$path = 'HKLM:\Software\Policies\Microsoft\Windows\NetCache'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'EncryptCache' -Value 1 -Type DWord Intune XML
OMA-URI: ./Device/Vendor/MSFT/Policy/Config/ADMX_OfflineFiles/Pol_EncryptOfflineFiles
Data type: String
Value:
<enabled/> Intune Remediation
# === Detection script ===
# Exported from gporais.com
# Policy: Chiffrer le cache des fichiers hors connexion
# State: Enabled
# Supported on: Au minimum Windows Server 2003 Service Pack 1, Windows XP Professionnel Service Pack 2 ou Windows 2000 Service Pack 5
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 'EncryptCache' -Expected 1 -Kind DWord)
)
if ($checks -notcontains $false) {
Write-Output 'Compliant'
exit 0
}
Write-Output 'Non-compliant'
exit 1
# === Remediation script ===
# Exported from gporais.com
# Policy: Chiffrer le cache des fichiers hors connexion
# State: Enabled
# Supported on: Au minimum Windows Server 2003 Service Pack 1, Windows XP Professionnel Service Pack 2 ou Windows 2000 Service Pack 5
$path = 'HKLM:\Software\Policies\Microsoft\Windows\NetCache'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'EncryptCache' -Value 1 -Type DWord Scripts SCCM
# Exported from gporais.com
# Policy: Chiffrer le cache des fichiers hors connexion
# State: Enabled
# Supported on: Au minimum Windows Server 2003 Service Pack 1, Windows XP Professionnel Service Pack 2 ou Windows 2000 Service Pack 5
# 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: Chiffrer le cache des fichiers hors connexion
# State: Enabled
# Supported on: Au minimum Windows Server 2003 Service Pack 1, Windows XP Professionnel Service Pack 2 ou Windows 2000 Service Pack 5
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 'EncryptCache' -Expected 1 -Kind DWord)
)
if ($checks -notcontains $false) {
Write-Output 'Compliant'
exit 0
}
Write-Output 'Non-compliant'
exit 1
# === Remediation script ===
# Exported from gporais.com
# Policy: Chiffrer le cache des fichiers hors connexion
# State: Enabled
# Supported on: Au minimum Windows Server 2003 Service Pack 1, Windows XP Professionnel Service Pack 2 ou Windows 2000 Service Pack 5
$path = 'HKLM:\Software\Policies\Microsoft\Windows\NetCache'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'EncryptCache' -Value 1 -Type DWord Vous construisez une collection multi-paramètres ? Ajoutez ce paramètre et générez des exports combinés (.reg, PowerShell, GPO).