Ouvrir dans l'explorateur

Configurer la synchronisation en arrière-plan

Configure Background Sync

Type
Ordinateur
Chemin GPO
Configuration ordinateur › Stratégies › Modèles d'administration › Réseau › Fichiers hors connexion EN : Computer Configuration › Policies › Administrative Templates › Network › Offline Files
Pris en charge sur
Au minimum Windows Server 2008 R2 ou Windows 7 EN : At least Windows Server 2008 R2 or Windows 7
Fichier ADMX
OfflineFiles.admx
Nom interne
OfflineFiles/Pol_BackgroundSyncSettings

Explication

Texte français issu de Windows 11 26H2

Ce paramètre de stratégie détermine le moment de la synchronisation en arrière-plan pendant un fonctionnement en mode de liaison lente, lequel s’applique à tous les utilisateurs qui ouvrent une session sur un ordinateur lorsque cette stratégie est appliquée. Pour contrôler le mode de liaison lente, utilisez le paramètre de stratégie « Configurer le mode de liaison lente ».

Si vous activez ce paramètre de stratégie, vous pouvez spécifier quand Windows procède à une synchronisation en arrière-plan lorsque le mode de liaison lente est en vigueur. Utilisez les valeurs « Intervalle de synchronisation » et « Écart de synchronisation » pour remplacer les paramètres par défaut. Utilisez les valeurs « Heure de début du blocage » et « Durée du blocage » pour définir la durée pendant laquelle la synchronisation en arrière-plan est désactivée. Utilisez la valeur « Durée maximale autorisée sans synchronisation » pour vous assurer que tous les dossiers réseau de l’ordinateur sont régulièrement synchronisés avec le serveur.

Vous pouvez également configurer la synchronisation d’arrière-plan pour les partages réseau placés en mode Travailler hors connexion par les utilisateurs. Ce mode est appliqué lorsqu’un utilisateur sélectionne le bouton Travailler hors connexion pour un partage spécifique. Dans ce cas, tous les paramètres configurés s’appliquent également aux partages placés en mode Travailler hors connexion par les utilisateurs.

Si vous désactivez ce paramètre de stratégie ou si vous ne le configurez pas, Windows effectue une synchronisation en arrière-plan des dossiers hors connexion en mode de liaison lente à un intervalle par défaut avec un début de synchronisation variable entre 0 et 60 minutes supplémentaires. Dans Windows 7 et Windows Server 2008 R2, l’intervalle de synchronisation par défaut est de 360 minutes. Dans Windows 8 et Windows Server 2012, l’intervalle de synchronisation par défaut est de 120 minutes.

This policy setting controls when background synchronization occurs while operating in slow-link mode, and applies to any user who logs onto the specified machine while this policy is in effect. To control slow-link mode, use the "Configure slow-link mode" policy setting.

If you enable this policy setting, you can control when Windows synchronizes in the background while operating in slow-link mode. Use the 'Sync Interval' and 'Sync Variance' values to override the default sync interval and variance settings. Use 'Blockout Start Time' and 'Blockout Duration' to set a period of time where background sync is disabled. Use the 'Maximum Allowed Time Without A Sync' value to ensure that all network folders on the machine are synchronized with the server on a regular basis.

You can also configure Background Sync for network shares that are in user selected Work Offline mode. This mode is in effect when a user selects the Work Offline button for a specific share. When selected, all configured settings will apply to shares in user selected Work Offline mode as well.

If you disable or do not configure this policy setting, Windows performs a background sync of offline folders in the slow-link mode at a default interval with the start of the sync varying between 0 and 60 additional minutes. In Windows 7 and Windows Server 2008 R2, the default sync interval is 360 minutes. In Windows 8 and Windows Server 2012, the default sync interval is 120 minutes.

Registre

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\NetCache
Nom de la valeur
BackgroundSyncEnabled
ÉtatValeur écrite
ActivéREG_DWORD = 1
DésactivéREG_DWORD = 0

PowerShell

Commandes PowerShell qui écrivent dans le registre ce que la stratégie écrirait. Les valeurs entre chevrons (<…>) sont à remplacer.

Écrire directement dans le registre contourne la stratégie de groupe : si une GPO gère cette valeur, elle sera réécrite au prochain gpupdate ; sinon la valeur reste en place (effet « tatouage »). Préférez une GPO ou, en local, LGPO.exe. Exécutez PowerShell en administrateur pour HKLM. Certaines stratégies demandent un redémarrage ou gpupdate /force.

Activer

# Activer : OfflineFiles/Pol_BackgroundSyncSettings
$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 'BackgroundSyncEnabled' -Value 1 -Type DWord
# Intervalle de synchronisation (minutes)
Set-ItemProperty -Path $k -Name 'BackgroundSyncPeriodMin' -Value 360 -Type DWord  # entre 1 et 1440
# Écart de synchronisation (minutes)
Set-ItemProperty -Path $k -Name 'BackgroundSyncMaxStartMin' -Value 60 -Type DWord  # entre 0 et 3600
# Durée maximale autorisée sans synchronisation (minutes)
Set-ItemProperty -Path $k -Name 'BackgroundSyncIgnoreBlockOutAfterMin' -Value 0 -Type DWord  # entre 0 et 4294967295
# Heure de début du blocage (HHMM)
Set-ItemProperty -Path $k -Name 'BackgroundSyncBlockOutStartTime' -Value 0 -Type DWord  # entre 0 et 2400
# Durée du blocage (minutes)
Set-ItemProperty -Path $k -Name 'BackgroundSyncBlockOutDurationMin' -Value 0 -Type DWord  # entre 0 et 1440
# Activer la synchronisation en arrière-plan pour les partages placés en mode de travail hors connexion par l’utilisateur
# décoché : 0
Set-ItemProperty -Path $k -Name 'BackgroundSyncEnabledForForcedOffline' -Value 1 -Type DWord

Désactiver

# Désactiver : OfflineFiles/Pol_BackgroundSyncSettings
$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 'BackgroundSyncEnabled' -Value 0 -Type DWord

Revenir à « Non configuré »

# Revenir à « Non configuré » : OfflineFiles/Pol_BackgroundSyncSettings
$k = 'HKLM:\Software\Policies\Microsoft\Windows\NetCache'
Remove-ItemProperty -Path $k -Name 'BackgroundSyncEnabled' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'BackgroundSyncPeriodMin' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'BackgroundSyncMaxStartMin' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'BackgroundSyncIgnoreBlockOutAfterMin' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'BackgroundSyncBlockOutStartTime' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'BackgroundSyncBlockOutDurationMin' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'BackgroundSyncEnabledForForcedOffline' -ErrorAction SilentlyContinue

Options (6)

LibelléContrôleValeur de registreType REGContraintes / détails
Intervalle de synchronisation (minutes)Sync Interval (minutes)Lbl_BackgroundSyncDefaultSyncTimeZone numériquedecimalBackgroundSyncPeriodMinREG_DWORD
Min : 1 · Max : 1440 · Défaut (interface) : 360
Écart de synchronisation (minutes)Sync Variance (minutes)Lbl_BackgroundSyncVarianceZone numériquedecimalBackgroundSyncMaxStartMinREG_DWORD
Min : 0 · Max : 3600 · Défaut (interface) : 60
Durée maximale autorisée sans synchronisation (minutes)Maximum Allowed Time Without A Sync (minutes)Lbl_BackgroundSyncIgnoreBlockOutTimeZone numériquedecimalBackgroundSyncIgnoreBlockOutAfterMinREG_DWORD
Min : 0 · Max : 4294967295 · Défaut (interface) : 0
Heure de début du blocage (HHMM)Blockout Start Time (HHMM)Lbl_BackgroundSyncBlockOutPeriodStartTimeZone numériquedecimalBackgroundSyncBlockOutStartTimeREG_DWORD
Min : 0 · Max : 2400 · Défaut (interface) : 0
Durée du blocage (minutes)Blockout Duration (minutes)Lbl_BackgroundSyncBlockOutPeriodDurationZone numériquedecimalBackgroundSyncBlockOutDurationMinREG_DWORD
Min : 0 · Max : 1440 · Défaut (interface) : 0
Activer la synchronisation en arrière-plan pour les partages placés en mode de travail hors connexion par l’utilisateurEnable Background Sync for shares in user selected "Work Offline" modeLbl_BackgroundSyncInForcedOfflineCase à cocherbooleanBackgroundSyncEnabledForForcedOfflineREG_DWORD
Coché : REG_DWORD = 1
Décoché : REG_DWORD = 0

Disponibilité