How To Fix Failed to Run Task Sequence (0x8007000F)

When trying to deploy an image via a task sequence you will see the error failed to run task sequence (0x8007000F) shortly after PXE booting to WinPE.

If you press F8 and look at the logs you will see the following

Failed to Stage WinPE

Failed to prepare the system partition for staging.
The system cannot find the drive specified. (Error: 8007000F; Source: Windows)

The cause of this error is because the task sequence was unable to format / access one of the local drive partitions on the machine you are trying to load the image on to.  This could be for one of the following reasons

  • Hidden partition
  • Bitlocker partition
  • Corrupt partition

To fix failed to run task sequence (0x8007000F) follow these steps

  • PXE Boot the machine again
  • Press F8 to bring up the command prompt
  • In the command prompt type in the following commands one by one
  • Diskpart
  • Select disk 0
  • Clean
  • Convert gpt
  • Create partition efi size=300
  • Assign letter=k (or any available letter you want)
  • Format quick fs=FAT32
  • Create partition msr size=128
  • Create partition primary
  • Assign letter=c (at this step if the C letter is not available, check if you have USB key mounted)
  • Format quick fs=NTFS
  • Exit

Restart your machine and try to run the task sequence again

Automate The DISKPART Task

You can actually automate the above process so you do not need to do it manually every time.  You can enter the diskpart command in to the task sequence.  To do this follow these steps

  • Create a package in SCCM
  • Create a diskpart.txt file and put the below lines in to it
    select disk 0
    clean
    convert gpt
    create partition primary size=300
    format quick fs=ntfs label=Windows RE tools
    assign letter=T
  • Distribute the package
  • Add a command line step in to your task sequence with the following line
    diskpart /s diskpart.txt
  • Make sure to tick the Package box and select the diskpart package
  • I also like to tick the box “Continue on Error” for this task sequence step.

For more information about this diskpart process you can take a look at this article