Disk Management Using CMD: Step-by-Step Guide to Partition and Format Drives in Windows 2025


What if just a single wrong command could wipe your entire drive in seconds? Imagine sitting there, watching all your files vanish as quickly as the cursor blinks—no warning, no turning back. Are you sure you know what’s lurking behind those simple CMD instructions? Today, take control of your disks… but only if you’re ready for the secrets and risks that come with every keystroke.

Disk Management Using CMD: Your Easy, Complete DiskPart Cheat Sheet

Managing your computer’s storage doesn’t have to be confusing. With DiskPart, a powerful Windows CMD tool, you can list disks, create new partitions, format drives, assign drive letters, and much more — all with just a few simple commands.

This guide breaks down each step into layman-friendly examples, so you can confidently control your disks without the tech jargon.

Let’s simplify disk management with DiskPart — the command-line tool that gives you full control of your drives the easy way!

How to Partition a Disk Using the CMD Command

Step 1: Open Command Prompt as Administrator and type diskpart to start the DiskPart tool.


  • When you hit Enter, New CMD will open, which is the diskpart tool or window. like this 👇

Step 2: First, list all your connected drives with:

list disk

  • This shows all your hard drives and USBs. For example:


Step 3: Choose the disk you want to manage by typing:

 select disk 0


Step 4: To see all partitions on this disk, use:

list partition



Step 5: To create a Partition, use this command:

create partition primary size=50000

  • write size in megabytes:

Step 6: Once created, format the new partition to make it usable:

format fs=ntfs quick label=Data

  • fs=ntfs  means Windows file system
  • quick speeds up the process
  • label=Data names the drive
Step 7: Assign a letter to your new partition so it shows up in File Explorer:
assign letter=D

Summary of Disk Partition

diskpart
list disk
select disk 1        # CHANGE number to the disk you want
list partition
create partition primary size=102400   # size in MB (here 100 GB)
format fs=ntfs quick label=Data
assign letter=E
exit

Congratulations you have sucessfully created Partition

Now what you will do if your want to increase the size of your created partition

let understand how you can increase the size it is very simple and easy

Increase the Size of your disk

diskpart
select volume 3           # choose the volume you want to extend
extend size=10240         # size in MB to add (optional). If omitted, uses all free space
exit

Done! You have sucessfully increase the size 😊