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 CommandsWhat does it do
DiskpartLaunches the disk partition utility
Select Disk 0Selects Disk 0, the only disk in the machine
CleanErases all partition data from the disk, rendering it non-functional.
Create Partition PrimaryCreates a primary partition on Disk 0
Select Partition 1Select the newly created partition
ActiveMarks the newly created partition as Active
Assign letter=cSets the new partition as C:
Format quick fs=NTFSFormats the new primary partition as NTFS
ExitQuits Disk Utility

Hard Disk DiskPart Commands (UEFI)

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

Diskpart CommandsWhat does it do
DiskpartLaunches the disk partition utility
Select Disk 0Selects Disk 0, the only disk in the machine
CleanErases all partition data from the disk, rendering it non-functional.
Convert gptConverts the selected disk to GPT format
Create partition efi size=200Creates a EFI system partition of 200 MB
Assign letter=sAssigns the newly created EFI partition as S:
Format quick fs=FAT32Formats the EFI partition as FAT32
Create partition msr size=128Creates a MSR system partition of 128 MB
Create Partition PrimaryCreates a primary partition on Disk 0
Select Partition 3Select the last created partition
ActiveMarks the newly created partition as Active
Assign letter=cSets the new partition as C:
Format quick fs=NTFSFormats the new primary partition as NTFS
ExitQuits Disk Utility
Back to top button