▷ Diskpart Manual (commands and instructions)

Contents

Managing your disks is one of the most important tasks you need to do to improve performance and accessibility. There is a specific program within Windows called Disk Management which has an easy to use user interface and can perform most of the tasks, but what if you can't get that program to work or you want to understand disk management better? disks or if Windows does not start normally? These are the situations where you would need a pretty neat utility called DiskPart.

As the name implies, it's a tool, in fact it is a command line tool used for disk management using a simple command line. You can perform various operations, from listing disk and partition details to erasing and creating new partitions. In this way, you can better control your disk management using DiskPart within Windows.

DiskPart was first made available in Windows XP and is still built into the latest version of Windows, namely, Windows 10. DiskPart works with numerous commands that are used to perform different operations on a selected disk or partition. All you need to do is select a destination disk or partition and you can do whatever you want.

Then, in this guide, I am going to explain some of the more useful commands that you can use to manage your disks using the DiskPart utility tool.

How to start the DiskPart utility tool?

Starting the DiskPart utility tool is pretty straightforward if you start it on your specific version of Windows. Follow the instructions below to start DiskPart.

Running DiskPart if it starts in Windows:

There are different ways to run this utility tool, but here is a universal method to run it on any version of Windows. If your Windows runs normally, you can start the DiskPart utility tool by opening the Run command. You can open Run by typing this inside the search area of ​​the Start menu.

diskpart-1-1-5170592

Now, you must open command prompt to access DiskPart. Type cmd in the Run command area and hit the Enter key on your keyboard. This will open the command prompt.

diskpart-2-8181342

Inside the command prompt, type diskpart and hit Enter key again. The command prompt will launch the DiskPart utility tool in a new window with some of your computer's information at the top.

diskpart-3-4968419

Running DiskPart if unable to boot into Windows:

Starting DiskPart if you can't start Windows is a bit tricky. All you need to do is access the command prompt at the start of your PC. Command prompt access is different for different versions of Windows.

Windows 7:

The best and most convenient way to start the command prompt if you are unable to boot into your Windows 7 is to use a Windows bootable USB drive 7. Connect USB to your PC and press any key when prompted to boot from USB. On the Windows installation screen 7, you will find an option, for example Repair your computer at the bottom.

diskpart-4-9866877

Select your operating system from the list and click Next to proceed to the next window. Click Command Prompt at the bottom and type diskpart followed by the Enter key.

diskpart-5-6320512

Windows 8 Y 10:

In Windows 8 Y 10, You can access DiskPart by restarting the PC and holding the Shift key combination + F8 to open the advanced menu. Click on Troubleshoot and select Command Prompt. Type diskpart in and hit Enter.

Disc command and instruction part:

The heart and soul of the DiskPart utility are the commands used to perform different operations. These commands are not case sensitive and can be conveniently used to manage your disks. These are some of the most important commands you will need when it comes to disk management.

list of discs:

If you want to get a list of all the disks currently connected to your PC, this command is quite useful as it shows a lot of information, including the total number of discs, disk size and status, etc. In my case, I only have one disk connected to my PC.

Syntax: disk list

This command can display the error “No fixed discs to display” if not successful.

diskpart-6-6652236

select disk:

To select a specific disk connected to your PC, you can use select disk command along with disk number. In my case, I will select the disk 0. A message will be displayed stating that the particular disk is now selected.

Syntax: select disk 0 (“0” is the disk number in my case)

diskpart-7-6652232

detail disk:

This command is used to view the full details of the selected disk. It is very useful in certain occasions when you need a lot of information about a disc.

Syntax: detail disk

diskpart-8-9267315

delete disk:

The disk erase command is used to erase a dynamic disk that is missing from the disk list. This command should be used with care as it can cause some serious problems.

Syntax: delete disk

partition list:

Now, you would like to take a look at the partitions of the selected disk. Then, DiskPart has a pretty good command for that purpose. All you need to do is write the list partition at the prompt and hit Enter. It would show a list of all partitions along with their numbers and sizes, etc.

Syntax: list partition

diskpart-9-9682671

select partition:

To set the focus of the DiskPart utility to a specific partition within the selected disk, you can use select partition command along with a partition number displayed. In my case, I will set the focus to the Partition 3. Therefore, the syntax will be the following.

Syntax: select partition 3 (“3” is the partition number in my case)

diskpart-11-9146926

partition detail:

You can use the details partition command to view the details of the currently selected partition. You can select any partition using the select partition command mentioned above. In my case, i will see the partition details # 3. To do this, I will select the partition # 3 and then I will run the partition details command.

Syntax: partition detail

diskpart-11-9146926

delete partition:

To erase the currently active partition, you can use the delete partition command. It is recommended to select the partition first with the partition select command and then use the delete partition command to delete it. What's more, you may run into access denied error if command is unsuccessful.

Syntax: delete partition

diskpart-9-9682671

list volume:

Volumes on a PC can be viewed using the volume list command within DiskPart. Shows all volumes available on the computer along with some basic information. In my case, there are five volumes available on my PC.

Syntax: list volume

diskpart-13-7326089

select volume:

To select a particular volume, you can use select volume command along with volume number listed above using list volume command. In my case, I will select the third volume.

Syntax: select volume 3 (“3” is the volume number in my case)

diskpart-14-6548269

detail volume:

The details of a selected volume can be viewed using the details volume command. Displays a complete list of information about the selected volume. In my case, as I had selected the volume 3, the verbose volume command was showing the details of the third volume on my PC.

Syntax: detail volume

diskpart-15-6911750

clear volume:

A volume can be erased in the same way as a disk or partition. Therefore, to delete the selected volume, you can use the benefits of the cool command called remove volume.

Syntax: clear volume

create volume:

Creating a volume is pretty easy. You can create a simple volume using ie create simple volume command along with some attributes, including size (MB) and the disk number. If the disk size or number is not specified, the basic settings will be adopted to create a new simple volume. The same goes for volume striping and volume raid command creation with a little difference on disks.

  Syntax:  create simple volume [size] [disco #]
  Syntax:  create volume fringe [size] [discos (two or more than two)]
  Syntax:  create volume raid [size] [discos (three or more of 3)]

:

One of the most important commands used in DiskPart is the format. You can format any volume with this command. You must first select the volume you want to format using the selected volume command before using formatting. You can also specify multiple parameters to get the desired results.

  Syntax:  format FS=NTFS label="My Drive" Quick Compress
 FS: FS represents the file system .
 Hashtag: label is the name of your unit. You can write anything.
 Fast compression: Compress the disk accordingly.
 Create a partition: 

There are several commands that depend on the type of partition you need to create. You can create a primary partition using the create partition primary command along with some option parameters, including size (MB) and displacement. Extended partitions and logical partitions can also be created using the create extended partition and create logical partitions commands, respectively.

Syntax: create primary partition, logical and extended [size] [displacement]

convert mbr:

To convert an empty disk with GPT partition style to MBR partition style, you can use the convert mbr command keeping in mind that the disk must be empty. Otherwise, you could lose all your data.

Syntax: convert mbr

convert gpt:

To convert an empty disk with an MBR partition style to a GPT partition style, you can use the convert gpt command keeping in mind that the disk must be empty. Otherwise, you could lose all your data.

Syntax: convert gpt

rescan:

The best advantage of using the DiskPart utility tool is its ability to rescan the E buses. / S along with the disks just added to the computer. This can be done through a single command called rescan.

Syntax: re-examine

The commands mentioned above are just the basic ones that are mainly used within the DiskPart utility. For detailed reference, you can navigate to this link.

Subscribe to our Newsletter

We will not send you SPAM mail. We hate it as much as you.