DiskPart is a disk partitioning command-line utility that is compatible with all recent versions of Windows. DiskPart has a range of useful disk operations that help to manage a computer’s drive (i.e., disks, partitions, volumes, or virtual hard disks).
Press the Windows key and the “R” key together to open up a Run dialog box. Type “diskpart” into the box and click the “OK” button. Allow DisPart to make changes to your device in response to the User Account Control prompt.
Before running commands on DiskPart, you need to select an object on which the commands will be run. The list
command is used to bring objects in focus. This command also displays a list of available objects alongside their object numbers. These list commands are:
list disk
: Displays all disks on the machine.list volume
: Displays all volumes on the machine.list partition
: Displays all partitions on the focused disk.list vdisk
: Displays all virtual disks on the machine.Once the desired object is under focus, you can run DiskPart commands on it. Some common DiskPart commands are:
create <partition/volume>
: Creates a partition or volume.detail <disk/partition/volume/vdisk>
: Displays details about the focused disk, partition, volume, or virtual disk.clean
: Removes all partitions or volume formatting from the disk under focus.delete <disk/partition/shadows/volume>
: Deletes a partition or volume.exit
: Exits DiskPart.To learn more about DiskPart commands, visit the
Free Resources