By AOMEI / Last Updated June 28, 2020

What is DiskPart?

DiskPart, replacing its predecessor - fdisk, is a command-line utility that provides the ability to manage disks, partitions or volumes in your computer running all versions of the operating system since Windows 2000, also including the latest Windows 10. Users can input DiskPart commands directly to organize hard disk partitions or create a text file script to perform multiple commands. Most disk partition operations that you can perform in Disk Management tool are integrated into DiskPart.

How to open DiskPart in Windows 10?

You will need to launch Windows 10 DiskPart with Administrator permission. One way is to type "diskpart" in the Search box, and then when diskpart appears in the search results, right-click it and select "Run as administrator". The other way is to press "Windows logo + R" keys and type "diskpart" in the box, and then click "OK".

Open DiskPart Windows 10

Common DiskPart Windows 10 commands (examples study)

Before you can use DiskPart commands in Windows 10, you must first list, and then select an object to give it focus. When an object has been focused, any DiskPart commands that you type will act on that object.

At the DISKPART> prompt, type "list disk" to display all the disks in your computer. Each one will have a specific disk number, starting with 0. An asterisk (*) under GPT row means the disk is of GPT partition style. Unless there is only one disk, you will have to tell DiskPart which disk to manage by using "select disk n" command to give it focus. n represents the number of the disk.

List Disk

At the DISKPART> prompt, type "list volume" to display all the volumes on all disks. Each one will have a specific volume number, starting with 0. To tell DiskPart which volume to manage, you need to type "select volume n" to give it focus. n can be the number of the volume or the drive letter of the volume if has.

List Volume

To view what DiskPart can for you, just type help to see a list of commands.

DiskPart Commands

Next, we will take some of the most common commands that Diskpart uses as examples for you to get a further understanding.

Section 1. Most common Diskpart commands on volume in Windows 10

Because when selecting a volume, the focus remains on it until you select a different volume, “select volume” command may not be used in each operation. Besides, the examples are performed one after one and the effect of the previous operation will be viewed in the next operation. If you only need to perform one of the operations, you need to select the volume before using the corresponding command.

Note: Each time you type a command, you need to press "Enter" key to apply it.

1. Delete Volume

To delete a volume, please refer to the following command:

  • list volume

  • select volume 6 (here take F: drive for example).

  • delete volume

And then, you will receive a message says: DiskPart successfully deleted the volume.

Note: You cannot delete the system volume, boot volume, or any volume that contains the active paging file or crash dump.

Delete Volume

2. Create Partition

To create a partition, please refer to the following command:

  • create partition primary size=102400

And then, you will receive a message says: DiskPart succeeded in creating the specified partition.

Create Partition

The above command means to create a 102400MB (100GB) primary partition. To create other types of partition, you just need to replace primary with one of the followings:

Create Partition Type

➧Note: To create a partition, there must be unallocated space on the disk.

3. Format Partition

Type list volume command, you will find the new created partition is RAW, which means you must format partition before you can use it. To format a partition, please refer to the following command:

  • format fs=ntfs label="Windows 7" quick

And then, you will receive a message says: DiskPart successfully formatted the volume.

The above command means to perform a quick format on the partition. It will be formatted with NTFS file system and labeled as Windows 7. To create other file system partition like FAT, FAT32, you just need to replace ntfs with fat or fat32. The label can be any name as you like.

Format Partition

➧Note: DiskPart cannot format 32GB+ partition to FAT32. To format a large hard drive to FAT32, you have to turn to a third-party partition manager.

4. Assign Drive Letter

A partition without a drive letter will be hidden under "File Explorer". To assign a drive letter to an existing partition, please refer to the following command:

  • assign letter=F (F can be replaced with another letter that has not been used yet).

And then, you will receive a message says: DiskPart successfully assigned the drive letter or mount point.

Assign Drive Letter

5. Extend Partition

To extend a partition, please refer to the following command:

  • extend size=20480

And then, you will receive a message says: DiskPart successfully extended the volume.

The above command means to add 20480MB (20GB) to the volume 6. If no size is given, all of the contiguous unallocated space on its right side will be added.

Extend Partition

➧Note: To extend a partition, there must be contiguous unallocated space on its right side.

6. Shrink Partition

To shrink a partition, please refer to the following command:

  • shrink desired=10240

And then, you will receive a message says: DiskPart successfully shrunk the volume by 10GB.

Shrink Volume

➧Note: You can reduce the size of a volume only if it is formatted using the NTFS file system.

7. Mark Partition as Active

To mark a partition as active, please refer to the following command:

  • active

And then, you will receive a message says: DiskPart marked the current partition as active.

Mark as Active

Section 2. Most Common Commands on Disk in Windows 10

The most common diskpart commands used on the disk should be the MBR and GPT conversion. To delete all partitions or volumes on a disk and convert the disk between MBR and GPT, please refer to the following command:

  • list disk

  • select disk 1

  • clean

  • "convert got" or "convert mbr".

Clean Convert Disk

Free alternative to Windows 10 DiskPart Utility

As DiskPart alternative, AOMEI Partition Assistant Standard is a free partition manager software and disk management tool, which provides more features than DiskPart. It not only supports Windows 10, but also supports Windows 8.1/8, Windows 7, Vista and XP. With a user-friendly interface, it is very easy to use.

To perform an operation on a partition, you just need to right-click on it. The operations supported by AOMEI Partition Assistant Standard are as below:

Operation On Partition

The operations of disk management and step-by-step wizards are as below:

Operation On Disk

DiskPart in Windows 10 can meet the basic requirement of most users. And the free AOMEI Partition Assistant is more advanced than it and provides more amazing features. For example, it can extend/shrink both FAT32 and NTFS partition. For extending a partition, its “Merge partition” allows users to add non-adjacent unallocated space into the target partition. It is able to format large partition (2TB at most) to FAT32 file system. For partition style conversion, it can convert data disk between MBR and GPT without deleting partitions.

You can download this freeware and have a try. To get more advanced features, such as converting dynamic disk into basic without losing data, recovering lost partition, you can upgrade AOMEI Partition Assistant Standard to Professional version.