SCCM Task Sequence Error 0x80004005 while retrieving policy

This post provides solution to SCCM task sequence error 0x80004005 while retrieving policy. Before you read further, I want to tell you that error 0x80004005 is a generic error. Which means there could be more than one solution for this error. Therefore you must examine the smsts.log file to find out the actual issue. In my case during the OSD the task sequence failed at the very initial step. This issue was observed on one of the VM’s. So here is the issue and it’s description.

Task Sequence fails with the following error message. An error occurred while retrieving policy for this computer (0x80004005). For more information, please contact your system administrator or helpdesk operator.

SCCM Task Sequence Error 0x80004005 while retrieving policyThe smsts.log file reveals the following.

unknown host (gethostbyname failed).
sending with winhttp failed; 80072ee7.
Failed to get client identity (80072ee7).
Failed to request for client TSPxe.
SyncTimeWithMP() failed. 80072ee7.
Failed to get time information from MP: http://MPserverFQDN.
An error occurred while retrieving policy for this computer (0x80004005).
For more information, contact your system administrator or helpdesk operator.
RegOpenKeyExW is unsuccessful for Software\Microsoft\SMS\Task Sequence.
GetTsRegValue() is unsuccessful. 0x80070002.
TS environment not initialized

SCCM Task Sequence Error 0x80004005 while retrieving policy

Looking at the log file details, you could make out that there is a time sync issue. The error “SyncTimeWithMP() failed 80072ee7” should give you clear info that there is some issue with time synchronization. To resolve this issue one must check the clock in the BIOS of the affected machine. Ensure that the time in BIOS matches the time in the forest where the SCCM server is located. In other words ensure the time settings are same with both SCCM and PXE client. If not you will end up seeing the time sync errors. If you correct this, I bet the deployment should continue successfully in next try.


  1. Avatar photo Regis Fernando Schmidt says:

    HI, i have this problem on a TS. but I have the problem when I mark it as needed – and by appointment.

    When it’s available and without an appointment, it runs perfectly.

    wim ok and synchronized time ok.
    remaining deployment settings are default.

  2. Hi, I receive this error when executing a windows upgrade, from Wndows 10 1607 LTSB to 1803 enterprise. Can someone give me some guidance? Thanks

  3. Avatar photo Dharmesh Maheshwari says:

    I was also facing the same issue and sollution was that Windows 10 Build version should be compatible with SCCM Version.

  4. Avatar photo Jay Parekh says:


    I am having same issue, however, I’ve tested same thing with separate DHCP server with same setting it works perfectly. But when I assign DHCP IP range from my Firewall (Sonicwall NSA3600), It gives mentioned error, furthermore, as these are the new machines I am unable to locate smsts.log file.

  5. In continuation of my query earlier, I found out that the PC to be imaged gets IP from DHCP but can’t ping the local DP. I have several desktops of the same model and make but this happened since yesterday only. Since the local DP is not available, the TS failed. Can you please advise? Thanks

    1. Have you configured a boundary and associated the DP with a boundary group ?

  6. I was able to make the desktops with no errors suddenly TS stopped and gave the same error mentioned. I check the pre-boot log and found the exact errors mentioned above. I checked the BIOS time in the PC and it was correct. Can you please let me know what else could go wrong. I have made many PCs with the same TS and suddenly everything is stopped. I’m usinf Lenovo M900 series desktop. Please advise, Thanks

    1. I just got the same errors above for 2 different laptops. Only those 2 laptops fail to PXE boot, and if done through USB-C Network adapter, I got the above errors of unknown host and sending with WINHTTP failed. The time is correct on both laptops. Anybody have any other ideas??

  7. We had this issue back in the day when we started deploying Surface Pro 3 devices.
    The time on the devices was way off.

    I have a VBS script that runs as a pre-start command when launching WinPE. The script synchronises the time with our time server on the device and then continues.

    Never had this issue since then.

    1. Mind sharing the vb script?

        1. Avatar photo Jason Madruga says:

          what is the VB script to use to set time in Task Sequence`

Comments are closed.