Partition Recovery™ An expert tool for recovering lost partitions
Partition Recovery™
An expert tool for recovering lost partitions

Everything you should know about diskpart commands

In this article you will find out:

  • how to use diskpart
  • diskpart commands
  • how to protect your data

Are you ready? Let's read!

Disk Management Tool is a useful utility for managing disks and partitions (allows you to delete, create, and modify partitions) Windows. However, it is not as powerful as diskpart. Diskpart is the best choice if Windows does not start properly or if you are solving your problems through PowerShell.

This article will teach you how to properly manage Diskpart and make the most of it.

Guide on how to use diskpart

Using the Diskpart command line is only possible with administrative privileges using the command line or PowerShell terminal.

To access diskpart, you need to right-click the start menu button and select Windows PowerShell (Admin).

Next, type diskpart and press Enter, so you are at the interface of the Diskpart utility.

If you no longer need the services of this tool, enter the command "exit" and press Enter.

Diskpart commands

We invite you to familiarize yourself with the main available parameters:

  • select - a specific choice of target.
  • select disk - select a specific disk.
  • select section - select a specific section.
  • select volume - select a specific volume.
  • drive list - get a summary of the available drives on your computer.
  • partition list - get a summary of each partition available on a specific disk.
  • volume list - get a summary of each volume available on your computer.
  • active - activate focus on the current section.
  • assign - assign a letter or mount point to the current active partition.
  • create partition primary size = SIZE_IN_MB - create a new primary partition. SIZE_IN_MB is the size of the partition you want to create, in MB.
  • delete disk - delete a dynamic disk.

Options available with Diskpart


Listening

Once you open Diskpart, you need to check the current structure of hard drives and storage.

To do this, enter the list of drives and press Enter so that you will see all available removable and stationary drives.

Each disc will be numbered starting from zero. You need to remember the hard disk number in order to use it with future Diskpart commands.

You can also see the individual partitions of the hard disk:

Select the hard disk using the list disk command and then the hard disk number. You should now be able to delete or modify these partitions using the partition number in the following Diskpart command.

Deleting

If you want to remove one of the partitions or volumes, you can enter the following command on Diskpart.

So, first, enter the command to select a hard disk - select disk.

Next, enter the list of partitions, then select partition No., replacing No. with your section number.

Now, type the delete partition and hit enter. Diskpart will confirm that the partition has been removed.

Wiping

This is done as follows:

Select the disk you want to wipe by typing "select disk #", then type "clean" and press Enter. After completing the process, the program will confirm that the disk has been "clean" and is ready to create new partitions.

Creating and formatting

To create a partition, again, select a specific disk: select disk #, replacing # with your disk number, then enter create partition primary (in this case, the partition will use all the space on that disk).

If you want to create multiple partitions, enter create partition primary size = X instead, replacing X with the size of the partition, measured in megabytes.

Now re-enter the list of partitions, then enter select partition 1 and mark the partition as active by typing active in the "DISKPART>" line.

To format the disk to NTFS, enter format fs = NTFS label = R quick. Usually, Windows will automatically assign a drive letter.

Extending

To expand a volume or partition, you first need to select a disk using select disk #. Enter a list of volumes to display all available volumes on your PC, then select a volume: enter select volume #. Now it's worth introducing an extension to increase it to the maximum available size.

Protect your data with Partition Recovery!

DiskInternals Partition Recovery is a time-tested professional software for recovering data of any format and size. It works separately with each section of the hard drive and scans the deepest structures of the drive, which provides the best result. DiskInternals Partition Recovery supports the following file systems: HFS, NTFS, XFS, Ext2 / 3/4, ReiserFS, FAT12, ReFS, Reiser4, etc.

You can easily take advantage of the free trial version of DiskInternals Partition Recovery right now and ensure that there is no better solution to your problem with missing and damaged files. The application also supports the following operating systems: Windows 10/8/7 / XP / Vista, etc. and has a Preview function. With this free option, you are insured against wasted money in case of incorrect file recovery (although this is unlikely).

To export files, you can purchase a license and receive a license key with full access to the recovered data.

FREE DOWNLOADVer 8.0, Win BUY NOWFrom $139.95

0.21815800666809