Ask Your Question
0

What is the process of configuring a Windows machine to function as an NTP server using PowerShell?

asked 2022-07-20 11:00:00 +0000

ladyg gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2022-09-13 12:00:00 +0000

huitzilopochtli gravatar image

Here are the steps to configure a Windows machine to function as an NTP server using PowerShell:

  1. Open PowerShell with administrative privileges.

  2. Run the following command to check if the Windows Time service is running:

    Get-Service -Name W32Time

  3. If the Windows Time service is not running, start it by running the following command:

    Start-Service -Name W32Time

  4. Set the Windows Time service to start automatically by running the following command:

    Set-Service -Name W32Time -StartupType Automatic

  5. Open the UDP port 123 on the Windows firewall by running the following command:

    New-NetFirewallRule -DisplayName "NTP" -Direction Inbound -LocalPort 123 -Protocol UDP -Action Allow

  6. Configure the Windows machine to use itself as the NTP server by running the following command:

    w32tm /config /manualpeerlist:"127.0.0.1" /syncfromflags:MANUAL /update

  7. Enable the NTP server feature by running the following command:

    w32tm /config /reliable:yes /update

  8. Restart the Windows Time service by running the following command:

    Restart-Service -Name W32Time

Your Windows machine is now configured as an NTP server. Other devices on your network can now synchronize their time with it.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-07-20 11:00:00 +0000

Seen: 8 times

Last updated: Sep 13 '22