All W32TM Commands Failing with W32TM Access is denied. (0x80070005)

I ran into an issue where all w32tm commands were failing with this error on PDC and time was not syncing properly.

When i run w32tm /query /status, i would get Access is denied. (0x80070005) message.

Resolution:
                      You should follow the sequence order as below otherwise the issue will not resolve.
1. stop time service – net stop w32time

2. unregister time service – w32tm /unregister
3. REBOOT – This is mandatory step.
4. Register time service DLL – regsvr32 /u w32time.dll
5. Register time service – w32tm /register
6. Query time service status – sc query w32time

You should see the time service as shared process.
w32tim-shared
7. REBOOT – This is mandatory step.
8. If it’s PDC then run below commands to sync time from external source.
   – w32tm /config /manualpeerlist:”< externaltimeserver >,0x1 <externaltimeserver>,,0x1″  /syncfromflags:manual /reliable:yes /update
   – w32tm /resync
9. Below registry key should get updated with External Time Server details.

\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\W32Time\Parameters\NtpServer
10. Below registry key should get updated with the value NTP.
\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\W32Time\Parameters\Type
11. Run w32tm /query /status and w32tm /query /source to check everything is working.

12. On all other domain controllers run below commands to sync from PDC.
a. w32tm /config /syncfromflags:domhier /update
b. w32tm /query /source – It should show your PDC
c. net time \\<PDC> /set /yes – Run this command only if the command (a) doesn’t                    work  and not syncing time from PDC.
13.The below registry key should have the PDC emulator as time source.
HLMC\SYSTEM\Currentcontrolset\Services\W32time\Parameters\NtpServer
14. The below registry key should have the value Nt5DS

HLMC\SYSTEM\Currentcontrolset\Services\W32time\Parameters\Type

Hope this can help you, if you have anything unclear, please let me know.

Please remember to Leave a Reply in bottom of this article.

Important Note – This posting is provided AS-IS with no warranties or guarantees and confers no rights.

 

 

 

 

6 thoughts on “All W32TM Commands Failing with W32TM Access is denied. (0x80070005)

  1. All W32TM Commands Failing with W32TM Access is denied. (0x80070005)

    Resolution:
    You should follow the sequence order as below
    1. stop time service – net stop w32time
    2. unregister time service – w32tm /unregister

    ➤ “The following error occurred: Access is denied (0x80070005)”
    What part of “all” do you not understand?

    Like

  2. open Powershell,
    on the taskbar right-click the PowerShell icon and select “Run as Administrator”

    this should allow the use of w32 commands

    Liked by 1 person

Leave a comment