How to Use Diskpart Utility in Windows

DiskPart is essentially the command-line equivalent to the Disk Management tool, and can be useful in certain situations (such as when Windows won’t start). Be warned though, Diskpart is a powerful tool and unlike the Disk Management tool, it enables explicit control of partitions and volumes.

You’ll need to run DiskPart in administrator mode; one way to do this is to open your Start menu, type diskpart in the Search box, and then when diskpart.exe appears in the search results, right-click it and select Run as administrator.

imageOnce it’s running, type help at any time to see a list of commands. To get started, here’s how to extend a volume using DiskPart.

1. At the DISKPART> prompt, type: list disk to display all the drives on your computer. Each drive will have a disk number, starting with 0 (zero).

image

The result above tells us that I have two physical disks installed.

2. Unless you have only one drive, you’ll have to tell DiskPart which drive to use, like this: select disk n where n represents the number of the disk to modify.

image
3. Next, at the DISKPART> prompt, type: list volume to display all the volumes on the selected disk. Likewise, each volume has a volume number, starting with 0 (zero).

image
4. Regardless of the number of volumes on the drive, you’ll have to tell DiskPart which one to use, like this: select volume 3

image
5. Now that you’ve selected the partition to expand, go ahead and issue this command: extend to extend the volume. The extend command takes no options and displays no warning message or confirmation. The process begins immediately after you press the Enter key, and should take only a few seconds. The extend command will cause the  current in-focus volume to be extended into contiguous unallocated space.

image

6. When it’s done, type exit to quit the DiskPart utility.

DiskPart is a great command line utility for administrators and techies.  You can format, resize, extend and manage your drives and volumes using this powerful tool.

Ben Carigtan shows you how it’s done!

Comments [2]

  1. bigtree.smallaxe says:

    Hi I am using win xp and had already had my disk partitioned into c and d. C for my OS. I tried what you told me to and attempted to extend my C drive. I said I wasn't able to. I then tried to defrag the drive and this time it wouldn't allow me to. When I restarted my pc it wont boot up again. HELP! Do you know how or why this could have happened?

  2. padmasri says:

    I have VMware with vista 64 bit OS, will the solution given in your article work for this OS?

Leave a Reply