Enable Windows NTP Server
Activer le serveur NTP Windows
Explanation
This policy setting allows you to specify whether the Windows NTP Server is enabled.
If you enable this policy setting for the Windows NTP Server, your computer can service NTP requests from other computers.
If you disable or do not configure this policy setting, your computer cannot service NTP requests from other computers.
Ce paramètre de stratégie permet de spécifier si le serveur NTP Windows est activé.
Si vous activez ce paramètre de stratégie pour le serveur NTP Windows, votre ordinateur peut traiter les demandes NTP émanant d’autres ordinateurs.
Si vous désactivez ce paramètre de stratégie ou ne le configurez pas, votre ordinateur ne peut pas traiter les demandes NTP émanant d’autres ordinateurs.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\W32Time\TimeProviders\NtpServer- 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_NTPSERVER
$k = 'HKLM:\Software\Policies\Microsoft\W32Time\TimeProviders\NtpServer'
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_NTPSERVER
$k = 'HKLM:\Software\Policies\Microsoft\W32Time\TimeProviders\NtpServer'
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_NTPSERVER
$k = 'HKLM:\Software\Policies\Microsoft\W32Time\TimeProviders\NtpServer'
Remove-ItemProperty -Path $k -Name 'Enabled' -ErrorAction SilentlyContinue