SCCM OSD DiskPart Commands Troubleshooting

Sometimes during SCCM OSD you might need to use the diskpart commands to manually format or clean the hard disk. This is to fix error such as Task sequence has failed with the error code 0x800700A1.

Performing these actions is not always necessary, however it can definitely help if you’re having problems with SCCM OSD. This should get you back to an almost ‘out of the box’ configuration.

DiskPart commands help you to manage your PC’s drives (disks, partitions, volumes, or virtual hard disks). You can read more about DiskPart commands here.

To use the diskpart commands during SCCM OSD, perform a PXE boot, and before you select the Task Sequence, hit F8. From the command window that opens perform the following commands.

SCCM OSD DiskPart Commands (Legacy)

Following these instructions will clean out the hard disk, and create Legacy partitions on the disk.

Diskpart Commands What does it do
Diskpart Launches the disk partition utility
Select Disk 0 Selects Disk 0, the only disk in the machine
Clean Erases all partition data from the disk, rendering it non-functional.
Create Partition Primary Creates a primary partition on Disk 0
Select Partition 1 Select the newly created partition
Active Marks the newly created partition as Active
Assign letter=c Sets the new partition as C:
Format quick fs=NTFS Formats the new primary partition as NTFS
Exit Quits Disk Utility

Hard Disk DiskPart Commands (UEFI)

Following these instructions will clean out the hard disk, and create UEFI partitions on the disk.

Diskpart Commands What does it do
Diskpart Launches the disk partition utility
Select Disk 0 Selects Disk 0, the only disk in the machine
Clean Erases all partition data from the disk, rendering it non-functional.
Convert gpt Converts the selected disk to GPT format
Create partition efi size=200 Creates a EFI system partition of 200 MB
Assign letter=s Assigns the newly created EFI partition as S:
Format quick fs=FAT32 Formats the EFI partition as FAT32
Create partition msr size=128 Creates a MSR system partition of 128 MB
Create Partition Primary Creates a primary partition on Disk 0
Select Partition 3 Select the last created partition
Active Marks the newly created partition as Active
Assign letter=c Sets the new partition as C:
Format quick fs=NTFS Formats the new primary partition as NTFS
Exit Quits Disk Utility