Enable file synchronization on costed networks
Activer la synchronisation des fichiers sur des réseaux dont le coût est estimé
Explanation
This policy setting determines whether offline files are synchronized in the background when it could result in extra charges on cell phone or broadband plans.
If you enable this setting, synchronization can occur in the background when the user's network is roaming, near, or over the plan's data limit. This may result in extra charges on cell phone or broadband plans.
If this setting is disabled or not configured, synchronization will not run in the background on network folders when the user's network is roaming, near, or over the plan's data limit. The network folder must also be in "slow-link" mode, as specified by the "Configure slow-link mode" policy to avoid network usage.
Ce paramètre de stratégie détermine si les fichiers hors connexion sont synchronisés en arrière-plan, ce qui pourrait entraîner des surcoûts sur les téléphones cellulaires ou avec des forfaits haut débit.
Si vous activez ce paramètre, la synchronisation peut se produire en arrière-plan lorsque le réseau de l’utilisateur est itinérant, proche ou au-delà de la limite de données du forfait. Cela risque d’entraîner un surcoût sur les téléphones cellulaires ou avec des forfaits haut débit.
Si ce paramètre est désactivé ou n’est pas configuré, aucune synchronisation n’a lieu en arrière-plan sur les dossiers réseau lorsque le réseau de l’utilisateur est itinérant, proche ou au-delà de la limite de données du forfait. Le dossier réseau doit également être en mode « de liaison lente » conformément à la stratégie « Configurer le mode de liaison lente » pour éviter toute utilisation du réseau.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\NetCache- Value name
SyncEnabledForCostedNetwork
| 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: OfflineFiles/Pol_SyncOnCostedNetwork
$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 'SyncEnabledForCostedNetwork' -Value 1 -Type DWordDisable
# Disable: OfflineFiles/Pol_SyncOnCostedNetwork
$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 'SyncEnabledForCostedNetwork' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": OfflineFiles/Pol_SyncOnCostedNetwork
$k = 'HKLM:\Software\Policies\Microsoft\Windows\NetCache'
Remove-ItemProperty -Path $k -Name 'SyncEnabledForCostedNetwork' -ErrorAction SilentlyContinue