Open in the explorer

Subfolders always available offline

Sous-dossiers toujours disponibles 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
Windows Server 2003, Windows XP, and Windows 2000 only FR: Windows Server 2003, Windows XP et Windows 2000 uniquement
ADMX file
OfflineFiles.admx
Internal name
OfflineFiles/Pol_AlwaysPinSubFolders

Explanation

Makes subfolders available offline whenever their parent folder is made available offline.

This setting automatically extends the "make available offline" setting to all new and existing subfolders of a folder. Users do not have the option of excluding subfolders.

If you enable this setting, when you make a folder available offline, all folders within that folder are also made available offline. Also, new folders that you create within a folder that is available offline are made available offline when the parent folder is synchronized.

If you disable this setting or do not configure it, the system asks users whether they want subfolders to be made available offline when they make a parent folder available offline.

French text from Windows 11 26H2

Rend les sous-dossiers disponibles hors connexion lorsque leur dossier parent est rendu disponible hors connexion.

Ce paramètre étend automatiquement le paramètre « Rendre disponible hors connexion » à tous les sous-dossiers nouveaux et existants d’un dossier. Les utilisateurs n’ont pas la possibilité d’exclure les sous-dossiers.

Si vous activez ce paramètre, lorsque vous rendez un dossier disponible hors connexion, tous les dossiers contenus dans ce dossier le sont aussi. En outre, les nouveaux dossiers créés à l’intérieur d’un dossier disponible hors connexion sont rendus disponibles hors connexion lors de la synchronisation du dossier parent.

Si vous désactivez ce paramètre ou si vous ne le configurez pas, les utilisateurs doivent indiquer s’ils veulent que les sous-dossiers soient rendus disponibles hors connexion lorsqu’ils rendent un dossier parent disponible hors connexion.

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\NetCache
Value name
AlwaysPinSubFolders
StateValue written
Enablednot defined in the ADMX
Disablednot defined in the ADMX

PowerShell

PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.

The ADMX does not specify the value written when enabled; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled). The commands below use 1/0 as an assumption.

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_AlwaysPinSubFolders
$k = 'HKLM:\Software\Policies\Microsoft\Windows\NetCache'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'AlwaysPinSubFolders' -Value 1 -Type DWord  # assumed value (not defined in the ADMX)

Disable

# Disable: OfflineFiles/Pol_AlwaysPinSubFolders
$k = 'HKLM:\Software\Policies\Microsoft\Windows\NetCache'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'AlwaysPinSubFolders' -Value 0 -Type DWord  # assumed value (not defined in the ADMX)

Revert to "Not configured"

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

Availability