Open in the explorer

Synchronize all offline files when logging on

Synchroniser tous les fichiers hors connexion lors de l’ouverture de session

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_SyncAtLogon_2

Explanation

Determines whether offline files are fully synchronized when users log on.

This setting also disables the "Synchronize all offline files before logging on" option on the Offline Files tab. This prevents users from trying to change the option while a setting controls it.

If you enable this setting, offline files are fully synchronized at logon. Full synchronization ensures that offline files are complete and current. Enabling this setting automatically enables logon synchronization in Synchronization Manager.

If this setting is disabled and Synchronization Manager is configured for logon synchronization, the system performs only a quick synchronization. Quick synchronization ensures that files are complete but does not ensure that they are current.

If you do not configure this setting and Synchronization Manager is configured for logon synchronization, the system performs a quick synchronization by default, but users can change this option.

This setting appears in the Computer Configuration and User Configuration folders. If both settings are configured, the setting in Computer Configuration takes precedence over the setting in User Configuration.

Tip: To change the synchronization method without setting a setting, in Windows Explorer, on the Tools menu, click Folder Options, click the Offline Files tab, and then select the "Synchronize all offline files before logging on" option.

French text from Windows 11 26H2

Détermine si les fichiers hors connexion sont complètement synchronisés lorsque les utilisateurs ouvrent une session.

Ce paramètre désactive également l’option « Synchroniser tous les fichiers hors connexion avant d’ouvrir une session » de l’onglet Fichiers hors connexion. Il empêche les utilisateurs de tenter de modifier l’option pendant qu’un paramètre en a le contrôle.

Si vous activez ce paramètre, les fichiers hors connexion sont complètement synchronisés à l’ouverture de session. La synchronisation complète permet de s’assurer que les fichiers hors connexion sont complets et actualisés. L’activation de ce paramètre active automatiquement la synchronisation à l’ouverture de session dans le Gestionnaire de synchronisation.

Si ce paramètre est désactivé et que le Gestionnaire de synchronisation est configuré pour une synchronisation à l’ouverture de session, le système effectue uniquement une synchronisation rapide. La synchronisation rapide permet de s’assurer que les fichiers sont complets, mais elle ne garantit pas qu’ils soient actualisés.

Si vous ne configurez pas ce paramètre et que le Gestionnaire de synchronisation est configuré pour une synchronisation à l’ouverture de session, le système effectue une synchronisation rapide par défaut (cette option est modifiable).

Ce paramètre apparaît dans les dossiers Configuration ordinateur et Configuration utilisateur. Si les deux paramètres sont configurés, le paramètre dans Configuration ordinateur est prioritaire sur le paramètre dans Configuration utilisateur.

Conseil : pour modifier la méthode de synchronisation sans définir de paramètre, dans Windows Explorer, sur le menu Outils, cliquez sur Options des dossiers, cliquez sur l’onglet Fichiers hors connexion, puis sélectionnez l’option « Synchroniser tous les fichiers hors connexion avant d’ouvrir une session ».

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\NetCache
Value name
SyncAtLogon
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_SyncAtLogon_2
$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 'SyncAtLogon' -Value 1 -Type DWord

Disable

# Disable: OfflineFiles/Pol_SyncAtLogon_2
$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 'SyncAtLogon' -Value 0 -Type DWord

Revert to "Not configured"

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

Availability