Offline Files Availability on Continuous Availability Shares
Disponibilité de Fichiers hors connexion sur des partages avec Disponibilité continue
Explanation
This policy setting determines the behavior of Offline Files on clients connecting to an SMB share where the Continuous Availability (CA) flag is enabled.
If you enable this policy setting, the "Always Available offline" option will appear in the File Explorer menu on a Windows computer when connecting to a CA-enabled share. Pinning of files on CA-enabled shares using client-side caching will also be possible.
If you disable or do not configure this policy setting, Windows will prevent use of Offline Files with CA-enabled shares.
Note: Microsoft does not recommend enabling this group policy. Use of CA with Offline Files will lead to very long transition times between the online and offline states.
Ce paramètre de stratégie détermine le comportement de Fichiers hors connexion sur les clients se connectant à un partage SMB sur lequel l’indicateur Disponibilité continue (CA) est activé.
Si vous activez ce paramètre de stratégie; l’option « Toujours disponible hors connexion » s’affiche dans le menu de l’Explorateur de fichiers sur un ordinateur Windows lorsqu’il se connecte à un partage avec CA. L’épinglage de fichiers sur des partages avec CA à l’aide d’une mise en cache côté client est également possible.
Si vous désactivez ce paramètre de stratégie ou si vous ne le configurez pas, Windows empêche l’utilisation de Fichiers hors connexion avec des partages avec CA.
Remarque : Microsoft recommande de ne pas activer cette stratégie de groupe. L’utilisation de CA avec Fichiers hors connexion entraîne des durées de transition très longues entre les partages en ligne et hors connexion.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\LanmanWorkstation- Value name
AllowOfflineFilesforCAShares
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_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: LanmanWorkstation/Pol_EnableOfflineFilesforCAShares
$k = 'HKLM:\Software\Policies\Microsoft\Windows\LanmanWorkstation'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AllowOfflineFilesforCAShares' -Value 1 -Type DWordDisable
# Disable: LanmanWorkstation/Pol_EnableOfflineFilesforCAShares
$k = 'HKLM:\Software\Policies\Microsoft\Windows\LanmanWorkstation'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AllowOfflineFilesforCAShares' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": LanmanWorkstation/Pol_EnableOfflineFilesforCAShares
$k = 'HKLM:\Software\Policies\Microsoft\Windows\LanmanWorkstation'
Remove-ItemProperty -Path $k -Name 'AllowOfflineFilesforCAShares' -ErrorAction SilentlyContinue