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.
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).
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.
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.
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!