Diskpart Command Availability

The diskpart command is available from within the Command Prompt in Windows operating systems, including Windows 11, 10, 8, etc. You can also access this command from the Recovery Console in Windows 2000 and Windows XP.

Diskpart Command Syntax

For this one, the diskpart command will remove the Partition1 partition located on the hard drive \Device\HardDisk0. This command will remove the partition currently assigned the drive letter G. Finally, in this multi-part command, diskpart is being used to select a particular disk, disk 1 in this example, so that we can remove the readonly attribute that’s been set on it. We have a full guide on removing write protection if you need more information.

The fixboot, fixmbr, and bootcfg commands are often used with the diskpart command.