Configurer la synchronisation en arrière-plan
Vérifié avec Windows 11 25H2 — mis à jour le 30 juillet 2026
Pris en charge sur : Au minimum Windows Server 2008 R2 ou Windows 7
Chemin dans la console GPO
Configuration ordinateur\Modèles d'administration\Réseau\Fichiers hors connexion Description
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.
Registre
Software\Policies\Microsoft\Windows\NetCache Nom de valeur : BackgroundSyncEnabled
Activé : BackgroundSyncEnabled = 1
Désactivé : BackgroundSyncEnabled = 0
MDM / Intune (CSP)
./Device/Vendor/MSFT/Policy/Config/ADMX_OfflineFiles/Pol_BackgroundSyncSettings Documentation Microsoft Learn Données de correspondance : Microsoft Learn (CC BY 4.0)
Générateur d'exports
BETAConfigurez l'état, la portée et les options, puis générez les sorties .reg, PowerShell, Intune et SCCM — ou ajoutez le paramètre à une collection multi-paramètres.
Ces exports écrivent le registre — ce n'est pas une GPO managée. ⓘ
Fichier .reg
Windows Registry Editor Version 5.00
; Exported from gporais.com
; Policy: Configurer la synchronisation en arrière-plan
; State: Enabled
; Supported on: Au minimum Windows Server 2008 R2 ou Windows 7
[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\NetCache]
"BackgroundSyncEnabled"=dword:00000001
"BackgroundSyncPeriodMin"=dword:00000168
"BackgroundSyncMaxStartMin"=dword:0000003c
"BackgroundSyncIgnoreBlockOutAfterMin"=dword:00000000
"BackgroundSyncBlockOutStartTime"=dword:00000000
"BackgroundSyncBlockOutDurationMin"=dword:00000000
"BackgroundSyncEnabledForForcedOffline"=dword:00000000 Autres formats (PowerShell, Intune, SCCM)
PowerShell
# Exported from gporais.com
# Policy: Configurer la synchronisation en arrière-plan
# State: Enabled
# Supported on: Au minimum Windows Server 2008 R2 ou Windows 7
$path = 'HKLM:\Software\Policies\Microsoft\Windows\NetCache'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'BackgroundSyncEnabled' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'BackgroundSyncPeriodMin' -Value 360 -Type DWord
Set-ItemProperty -Path $path -Name 'BackgroundSyncMaxStartMin' -Value 60 -Type DWord
Set-ItemProperty -Path $path -Name 'BackgroundSyncIgnoreBlockOutAfterMin' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'BackgroundSyncBlockOutStartTime' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'BackgroundSyncBlockOutDurationMin' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'BackgroundSyncEnabledForForcedOffline' -Value 0 -Type DWord Intune XML
OMA-URI: ./Device/Vendor/MSFT/Policy/Config/ADMX_OfflineFiles/Pol_BackgroundSyncSettings
Data type: String
Value:
<enabled/>
<data id="Lbl_BackgroundSyncDefaultSyncTime" value="360"/>
<data id="Lbl_BackgroundSyncVariance" value="60"/>
<data id="Lbl_BackgroundSyncIgnoreBlockOutTime" value="0"/>
<data id="Lbl_BackgroundSyncBlockOutPeriodStartTime" value="0"/>
<data id="Lbl_BackgroundSyncBlockOutPeriodDuration" value="0"/>
<data id="Lbl_BackgroundSyncInForcedOffline" value="0"/> Intune Remediation
# === Detection script ===
# Exported from gporais.com
# Policy: Configurer la synchronisation en arrière-plan
# State: Enabled
# Supported on: Au minimum Windows Server 2008 R2 ou Windows 7
function Test-RegistryValue {
param(
[Parameter(Mandatory = $true)][string]$Path,
[Parameter(Mandatory = $true)][string]$Name,
[object]$Expected,
[ValidateSet('String', 'DWord', 'MultiString')][string]$Kind = 'String',
[switch]$Absent
)
try {
$item = Get-ItemProperty -LiteralPath $Path -Name $Name -ErrorAction Stop
} catch {
return $Absent.IsPresent
}
if ($Absent.IsPresent) { return $false }
$actual = $item.$Name
if ($Kind -eq 'DWord') { return ([int64]$actual) -eq ([int64]$Expected) }
if ($Kind -eq 'MultiString') {
$actualValues = @($actual)
$expectedValues = @($Expected)
if ($actualValues.Count -ne $expectedValues.Count) { return $false }
for ($i = 0; $i -lt $expectedValues.Count; $i++) {
if ([string]$actualValues[$i] -ne [string]$expectedValues[$i]) { return $false }
}
return $true
}
return [string]$actual -eq [string]$Expected
}
$checks = @(
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\NetCache' -Name 'BackgroundSyncEnabled' -Expected 1 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\NetCache' -Name 'BackgroundSyncPeriodMin' -Expected 360 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\NetCache' -Name 'BackgroundSyncMaxStartMin' -Expected 60 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\NetCache' -Name 'BackgroundSyncIgnoreBlockOutAfterMin' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\NetCache' -Name 'BackgroundSyncBlockOutStartTime' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\NetCache' -Name 'BackgroundSyncBlockOutDurationMin' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\NetCache' -Name 'BackgroundSyncEnabledForForcedOffline' -Expected 0 -Kind DWord)
)
if ($checks -notcontains $false) {
Write-Output 'Compliant'
exit 0
}
Write-Output 'Non-compliant'
exit 1
# === Remediation script ===
# Exported from gporais.com
# Policy: Configurer la synchronisation en arrière-plan
# State: Enabled
# Supported on: Au minimum Windows Server 2008 R2 ou Windows 7
$path = 'HKLM:\Software\Policies\Microsoft\Windows\NetCache'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'BackgroundSyncEnabled' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'BackgroundSyncPeriodMin' -Value 360 -Type DWord
Set-ItemProperty -Path $path -Name 'BackgroundSyncMaxStartMin' -Value 60 -Type DWord
Set-ItemProperty -Path $path -Name 'BackgroundSyncIgnoreBlockOutAfterMin' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'BackgroundSyncBlockOutStartTime' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'BackgroundSyncBlockOutDurationMin' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'BackgroundSyncEnabledForForcedOffline' -Value 0 -Type DWord Scripts SCCM
# Exported from gporais.com
# Policy: Configurer la synchronisation en arrière-plan
# State: Enabled
# Supported on: Au minimum Windows Server 2008 R2 ou Windows 7
# SCCM Configuration Item guidance:
# Create a Configuration Item of type "Setting: Script".
# Discovery script: use the Detection script below.
# Remediation script: use the Remediation script below.
# Compliance rule: the Discovery script output equals 'Compliant'.
# === Detection script ===
# Exported from gporais.com
# Policy: Configurer la synchronisation en arrière-plan
# State: Enabled
# Supported on: Au minimum Windows Server 2008 R2 ou Windows 7
function Test-RegistryValue {
param(
[Parameter(Mandatory = $true)][string]$Path,
[Parameter(Mandatory = $true)][string]$Name,
[object]$Expected,
[ValidateSet('String', 'DWord', 'MultiString')][string]$Kind = 'String',
[switch]$Absent
)
try {
$item = Get-ItemProperty -LiteralPath $Path -Name $Name -ErrorAction Stop
} catch {
return $Absent.IsPresent
}
if ($Absent.IsPresent) { return $false }
$actual = $item.$Name
if ($Kind -eq 'DWord') { return ([int64]$actual) -eq ([int64]$Expected) }
if ($Kind -eq 'MultiString') {
$actualValues = @($actual)
$expectedValues = @($Expected)
if ($actualValues.Count -ne $expectedValues.Count) { return $false }
for ($i = 0; $i -lt $expectedValues.Count; $i++) {
if ([string]$actualValues[$i] -ne [string]$expectedValues[$i]) { return $false }
}
return $true
}
return [string]$actual -eq [string]$Expected
}
$checks = @(
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\NetCache' -Name 'BackgroundSyncEnabled' -Expected 1 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\NetCache' -Name 'BackgroundSyncPeriodMin' -Expected 360 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\NetCache' -Name 'BackgroundSyncMaxStartMin' -Expected 60 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\NetCache' -Name 'BackgroundSyncIgnoreBlockOutAfterMin' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\NetCache' -Name 'BackgroundSyncBlockOutStartTime' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\NetCache' -Name 'BackgroundSyncBlockOutDurationMin' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\NetCache' -Name 'BackgroundSyncEnabledForForcedOffline' -Expected 0 -Kind DWord)
)
if ($checks -notcontains $false) {
Write-Output 'Compliant'
exit 0
}
Write-Output 'Non-compliant'
exit 1
# === Remediation script ===
# Exported from gporais.com
# Policy: Configurer la synchronisation en arrière-plan
# State: Enabled
# Supported on: Au minimum Windows Server 2008 R2 ou Windows 7
$path = 'HKLM:\Software\Policies\Microsoft\Windows\NetCache'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'BackgroundSyncEnabled' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'BackgroundSyncPeriodMin' -Value 360 -Type DWord
Set-ItemProperty -Path $path -Name 'BackgroundSyncMaxStartMin' -Value 60 -Type DWord
Set-ItemProperty -Path $path -Name 'BackgroundSyncIgnoreBlockOutAfterMin' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'BackgroundSyncBlockOutStartTime' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'BackgroundSyncBlockOutDurationMin' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'BackgroundSyncEnabledForForcedOffline' -Value 0 -Type DWord Vous construisez une collection multi-paramètres ? Ajoutez ce paramètre et générez des exports combinés (.reg, PowerShell, GPO).