FIX: SCCM Task Sequence Failed to Run Command Line Error 0x8007010B

Let’s see how you can FIX SCCM Task Sequence Failed to run command line Error 0x8007010B. This error code prompts when the task sequence fails to execute steps during operating system deployment with Configuration Manager.

The SCCM task sequence command line should be installed silently during OS deployment, enabling SCCM admins to perform operations seamlessly.

Execute the “Run” command quickly to access required settings in only two steps, increasing your daily productivity.

The error 0x8007010B translates “The directory name is invalid”. This is often seen when the specified command run in task sequence step doesn’t have the valid path to execute the command line.

Patch My PC
[sibwp_form id=2]

You can learn how to add Run Command Line Step to SCCM Task Sequence. The command line added to the SCCM task sequence must be installed silently when you add it during the OS deployment.

Issue Summary

This error task sequence failed to Run Command Line Error 0x8007010B appears during the operating system deployment SCCM task sequence trying to execute the added steps attempted to access a directory that no longer exists or the name of the directory is invalid. Task Sequence fails with the following error message –

The task sequence execution engine Install Software failed to run the command line, hr=0x8007010b. The operating system reported error 2147942667: The directory name is invalid.

It’s best to examine the SMSTS.log to troubleshoot OSD-related problems. Learning to read SMSTS.log is very important, and be aware of the location of SMSTS log files for different phases of deployment. More you can explore SCCM OSD Task Sequence Troubleshooting Steps by Step Ultimate Guide SMSTS.log.

Adaptiva

 Here’s the highlight from the SMSTS.log –

FIX: SCCM Task Sequence Failed to Run Command Line Error 0x8007010B - Fig.1
FIX: SCCM Task Sequence Failed to Run Command Line Error 0x8007010B – Fig.1
Executing command line: Run command line
CreateProcess failed. Code(0x8007010B)
Command line executionfailed (8007010B)
Failed to execute command line. 
The directory name is invalid. (Error: 8007010B; Source: Windows)
Install Software failed to run command line, hr=0x8007010b. The operating system reported error 2147942667: The directory name is invalid. 

The Task Sequence Failed to Run Command Line Error 0x8007010B as the command line and path provided in the Run Command line step to sccm Task Sequence could not access content from the specified path. This could be due to a path mismatch or space between the directory names.

FIX: SCCM Task Sequence Failed to Run Command Line Error 0x8007010B - Fig.2
FIX: SCCM Task Sequence Failed to Run Command Line Error 0x8007010B – Fig.2

FIX – Task Sequence Failed to Run Command Line Error 0x8007010B

Let’s check the possible solutions to FIX Task Sequence Failed to Run Command Line Error 0x8007010B. It could be different based on the details you get into logs –

  • In the Configuration Manager console, go to the Software Library workspace, expand Operating Systems, and select the Task Sequences node.
  • Select the deployed task sequence you want to edit in the Task Sequence list. Then, select Edit to modify it.
  • Locate the steps and validate the command line added to steps and syntax. If you have added any path inside or directly to the command line, Make sure to add a double quote to avoid the space between them. For Example – cmd /c “Default Apps.bat”

Important – It’s always recommended to test the script manually before directly adding to the task sequence step. This will help you to perform a smooth deployment and ignore any further issues.

  • The files added to the source location are shared over a network location, and the Network Access Account has read permission on the directories.
  • If the commnad line has dependencies over files, Instead of running the script directly from the UNC path, Create a package and add all required files. Execute with the batch file as shown below –
FIX: SCCM Task Sequence Failed to Run Command Line Error 0x8007010B - Fig.3
FIX: SCCM Task Sequence Failed to Run Command Line Error 0x8007010B – Fig.3

After validating the steps, make the necessary changes. In the Task Sequence Editor, click Apply and OK to apply the changes. Then, perform the deployment. You should be able to successfully perform the deployment.

Resources

We are on WhatsApp. To get the latest step-by-step guides and news updates, Join our Channel. Click here –HTMD WhatsApp.

Author

Anoop C Nair has been Microsoft MVP for 10 consecutive years from 2015 onwards. He is a Workplace Solution Architect with more than 22+ years of experience in Workplace technologies. He is a Blogger, Speaker, and Local User Group Community leader. His primary focus is on Device Management technologies like SCCM and Intune. He writes about technologies like Intune, SCCM, Windows, Cloud PC, Windows, Entra, Microsoft Security, Career, etc.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.