Enable Windows NTP Client
Activer le client NTP Windows
Explanation
This policy setting specifies whether the Windows NTP Client is enabled.
Enabling the Windows NTP Client allows your computer to synchronize its computer clock with other NTP servers. You might want to disable this service if you decide to use a third-party time provider.
If you enable this policy setting, you can set the local computer clock to synchronize time with NTP servers.
If you disable or do not configure this policy setting, the local computer clock does not synchronize time with NTP servers.
Ce paramètre de stratégie spécifie si le client NTP Windows est activé.
L’activation du client NTP Windows permet à votre ordinateur de synchroniser son horloge avec d’autres serveurs NTP. Vous pouvez désactiver ce service si vous décidez d’utiliser un fournisseur de temps tiers.
Si vous activez ce paramètre de stratégie, vous pouvez définir l’horloge de l’ordinateur local de sorte qu’elle synchronise l’heure avec les serveurs NTP.
Si vous désactivez ce paramètre de stratégie ou ne le configurez pas, l’horloge de l’ordinateur local ne synchronise pas l’heure avec les serveurs NTP.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\W32time\TimeProviders\NtpClient- Value name
Enabled
| 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: W32Time/W32TIME_POLICY_ENABLE_NTPCLIENT
$k = 'HKLM:\Software\Policies\Microsoft\W32time\TimeProviders\NtpClient'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'Enabled' -Value 1 -Type DWordDisable
# Disable: W32Time/W32TIME_POLICY_ENABLE_NTPCLIENT
$k = 'HKLM:\Software\Policies\Microsoft\W32time\TimeProviders\NtpClient'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'Enabled' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": W32Time/W32TIME_POLICY_ENABLE_NTPCLIENT
$k = 'HKLM:\Software\Policies\Microsoft\W32time\TimeProviders\NtpClient'
Remove-ItemProperty -Path $k -Name 'Enabled' -ErrorAction SilentlyContinue