locked
How to set a Windows 2008 R2 domain controller to synchronize time with PDC?

    Question

  • I have a Windows 2008 R2 domain controller, call it serverA, which is holding PDC role. I use following command to set it synchronize time with a time source
    W32tm /config /syncfromflags:manual /manualpeerlist:"<ip addresses>"
    W32tm /config /reliable:yes
    W32tm /config /update
    W32tm /resync
    Net stop w32time
    Net start w32time

    This is working well.

    Later on I promoted another Windows 2008 R2 domain controller and transfer the PDC role to the new server, call it serverB. So I run the same commad on serverB so it sync with time source as well. Now I would like to set serverA to sync time with serverB instead of the NTP time source.

    How could I do it?

    I tried to run following command on serverA
    w32tm /config /syncfromflags:DOMHIER
    but I got error message as
    The following error occurred: The system cannot find the file specified. (0x80070002)

    Then I tried to run commad
    w32tm /unregister
    then I got error
    The following error occurred: Access is denied. (0x80070005)

    I am loggin as enterprise admin.

    What did I miss?

    Thanks!
    Friday, October 23, 2009 6:47 PM

Answers

  • The problem, opps this should not be called problem, is fixed.

    To set DC which syn. time with NTP server back to PDC is as following

    1. Stop Windows Time service - I missed this step. This is why I got the access denied error
    2. w32tm /unregister
        after this step, Windows time service is removed. If you didn't perform step 1, access denied error is returned. In that case, the service could not be removed because it is still running. But it is marked as remove. So reboot the server will fix
    3. After server reboot, you can confirm windows time service is not showing in service.msc console
    4. w32tm /register
       this command register windows time service using default value which uses PDC as time source.

    Hope this clears some confusion.

    • Marked as answer by Wilson Jia Friday, November 20, 2009 5:27 AM
    Thursday, November 19, 2009 11:21 PM
  • Hi blueinjazz,

    According to the error code, most likely it means that a file that initializes the command being accessed is corrupt or missing.

    You may try running the System File Checker which will replace and missing or corrupt system files.

    Go to Start and type cmd.exe In the results, right click the cmd.exe file and select the Run As Administrator option. In the command dialog, type
    the following.

    "sfc /scannow"

    Press ENTER.

    After above steps, please try the w32tm command again, Does it have any progress?

    Regards,
    Wilson Jia
    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Proposed as answer by Wilson Jia Thursday, October 29, 2009 1:59 AM
    • Marked as answer by Wilson Jia Friday, October 30, 2009 1:34 AM
    Tuesday, October 27, 2009 10:50 AM

All replies

  • Hi blueinjazz,

    According to the error code, most likely it means that a file that initializes the command being accessed is corrupt or missing.

    You may try running the System File Checker which will replace and missing or corrupt system files.

    Go to Start and type cmd.exe In the results, right click the cmd.exe file and select the Run As Administrator option. In the command dialog, type
    the following.

    "sfc /scannow"

    Press ENTER.

    After above steps, please try the w32tm command again, Does it have any progress?

    Regards,
    Wilson Jia
    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Proposed as answer by Wilson Jia Thursday, October 29, 2009 1:59 AM
    • Marked as answer by Wilson Jia Friday, October 30, 2009 1:34 AM
    Tuesday, October 27, 2009 10:50 AM
  • The problem, opps this should not be called problem, is fixed.

    To set DC which syn. time with NTP server back to PDC is as following

    1. Stop Windows Time service - I missed this step. This is why I got the access denied error
    2. w32tm /unregister
        after this step, Windows time service is removed. If you didn't perform step 1, access denied error is returned. In that case, the service could not be removed because it is still running. But it is marked as remove. So reboot the server will fix
    3. After server reboot, you can confirm windows time service is not showing in service.msc console
    4. w32tm /register
       this command register windows time service using default value which uses PDC as time source.

    Hope this clears some confusion.

    • Marked as answer by Wilson Jia Friday, November 20, 2009 5:27 AM
    Thursday, November 19, 2009 11:21 PM
  • This error is not a problem.
    If you enter a command:
    1. w32tm /unregister
    and get error 0x80070002, it says that failed to stop the service.

    Enter
    2. Net stop w32time
    to stop it.
    After stopping, it will automatically be removed.

    Issuing commands you create the service again with all the default values:
    3. w32tm /register    (this command create service and reset all setting)
    4. Net start w32time  (this command start time service)

    Do not reboot server. Server overload is not necessary.
    Monday, January 11, 2010 6:59 AM