Task Sequence has failed with the error code 0x80220005 – Recently I had created a task sequence to deploy Windows 7 Enterprise using SCCM, one of the SCCM engineer reported an OSD issue.

The task sequence failed with an error, Task Sequence has failed with the error code 0x80220005. The issue was reported in a remote site which had a distribution point serving that site. All the task sequence content was available on the distribution point.

So far the task sequence was successfully imaging the machines, but this time it failed. The next step was to examine the log files to begin troubleshooting this issue.

Install and Update Third Party Applications with Patch My PC
Install and Update Third Party Applications with Patch My PC

I asked the SCCM engineer to check at what step the task sequence failed. I also asked him to send me the SMSTS.log file. Upon examining the SMSTS.log file I found the below error in the smsts.log file –

Error – Failed to open the Task Sequencing Environment. Code 0x80220005. Please ensure you are running this executable inside a properly configured OS Deployment task sequence.

Deployment task sequence.
Unknown error Error: 80220005; Source: Unknown
Exiting with return code 0x80220005
Process completed with exit code 2149711877

Task Sequence has failed with the error code 0x80220005

This task sequence has failed with error code 0x80220005 is often seen when automating the computer name by defining variables inside the task sequence.

Task Sequence has failed with the error code 0x80220005

Solution – During the initial steps of the task sequence, the engineer was supposed to enter the computer name. This option was configured to make it easy for the engineer to provide a computer name of his choice and to avoid the system to auto-generate a random computer name which begins with MININT for the computer.

When asked on what computer name did he enter, he mentioned that he entered BALTRAJMANSOUR01. If you notice the computer name, it’s longer than 15 characters.

We know that the 16th character is always reserved to identify the functionality that is installed on the registered network device.

Upon entering the computer name of less than 15 characters, the OSD was successful. This fixed task sequence failed with error code 0x80220005. I hope this post helps you. If you have any questions, let me know in the comments section.

Still Need Help?

If you need further assistance on the above article or want to discuss other technical issues, check out some of these options.

Prajwal Desai

Prajwal Desai is a technology expert and 10 time Dual Microsoft MVP (Most Valuable Professional) with a focus on Microsoft Intune, SCCM, Windows 365, Enterprise Mobility, and Windows. He is a renowned author, speaker, & community leader, known for sharing his expertise & knowledge through his blog, YouTube, conferences, webinars etc.