Open in the explorer

Allow or Disallow use of the Offline Files feature

Autoriser ou interdire l’utilisation de la fonctionnalité de fichiers hors connexion

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Network › Offline Files FR: Configuration ordinateur › Stratégies › Modèles d'administration › Réseau › Fichiers hors connexion
Supported on
At least Windows 2000 FR: Au minimum Windows 2000
ADMX file
OfflineFiles.admx
Internal name
OfflineFiles/Pol_Enabled

Explanation

This policy setting determines whether the Offline Files feature is enabled. Offline Files saves a copy of network files on the user's computer for use when the computer is not connected to the network.

If you enable this policy setting, Offline Files is enabled and users cannot disable it.

If you disable this policy setting, Offline Files is disabled and users cannot enable it.

If you do not configure this policy setting, Offline Files is enabled on Windows client computers, and disabled on computers running Windows Server, unless changed by the user.

Note: Changes to this policy setting do not take effect until the affected computer is restarted.

French text from Windows 11 26H2

Ce paramètre de stratégie détermine si la fonctionnalité Fichiers hors connexion est activée. La fonctionnalité Fichiers hors connexion enregistre une copie des fichiers en réseau sur l’ordinateur de l’utilisateur, laquelle peut être utilisée lorsque l’ordinateur n’est pas connecté au réseau.

Si vous activez ce paramètre de stratégie, la fonctionnalité Fichiers hors connexion est activée et les utilisateurs ne peuvent pas la désactiver.

Si vous désactivez ce paramètre de stratégie, la fonctionnalité Fichiers hors connexion est désactivée et les utilisateurs ne peuvent pas l’activer.

Si vous ne configurez pas ce paramètre de stratégie, la fonctionnalité Fichiers hors connexion est activée sur les ordinateurs client Windows et désactivée sur les ordinateurs qui exécutent Windows Server, à moins que l’utilisateur ne modifie cette configuration.

Remarque : les modifications apportées à ce paramètre de stratégie sont sans effet tant que l’utilisateur ne redémarre pas l’ordinateur.

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\NetCache
Value name
Enabled
StateValue written
EnabledREG_DWORD = 1
DisabledREG_DWORD = 0

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_Enabled
$k = 'HKLM:\Software\Policies\Microsoft\Windows\NetCache'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'Enabled' -Value 1 -Type DWord

Disable

# Disable: OfflineFiles/Pol_Enabled
$k = 'HKLM:\Software\Policies\Microsoft\Windows\NetCache'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'Enabled' -Value 0 -Type DWord

Revert to "Not configured"

# Revert to "Not configured": OfflineFiles/Pol_Enabled
$k = 'HKLM:\Software\Policies\Microsoft\Windows\NetCache'
Remove-ItemProperty -Path $k -Name 'Enabled' -ErrorAction SilentlyContinue

Availability