Skip to content

VersusSSD

Disk Management vs DiskPart: Which Windows Drive Tool Should You Use?

Windows has two built-in drive tools: the Disk Management window and the DiskPart command line. We compare what each can do for initialising, partitioning, formatting, extending and shrinking drives, where DiskPart goes further with clean, convert gpt and read-only attributes, and which to use.

By , Senior Hardware Editor

6 min read

Disk Management vs DiskPart: Which Windows Drive Tool Should You Use?

Fit a new SSD, reuse an old hard drive or try to make room for another partition, and sooner or later you'll need one of Windows' two built-in drive tools. Disk Management is the graphical one: a window showing every drive and partition, with right-click options for the common jobs. DiskPart is the command-line one: a text interpreter that can do almost everything Disk Management does, plus some jobs it can't.

Both tools can delete data in seconds, so the most important advice comes first: back up anything you care about, and double-check the disk number before you change anything. If the drive is encrypted with BitLocker, make sure you can find your BitLocker recovery key before you start.

The short answer

  • Use Disk Management for everyday jobs: initialising a new drive, creating and formatting a volume, extending or shrinking a volume, and changing a drive letter. You can see what you're changing, and the wizards walk you through each step.

  • Use DiskPart when Disk Management can't do the job, such as wiping all the partitions from a drive with clean, converting an emptied drive to GPT, clearing a read-only flag, or scripting the same steps on several drives.

  • Use neither to extend a volume into free space that isn't directly after it: Microsoft says that isn't possible. Our roundup of the best free disk partition software covers tools that can.

At a glance

Disk Management

DiskPart

Interface

Graphical window with right-click menus and wizards

Command interpreter in Terminal or Command Prompt

How to open

Right-click Start > Disk Management, or run diskmgmt.msc as administrator

Run diskpart from an administrator terminal

Permissions

Administrators or Backup Operators group for tasks such as initialising and shrinking

Local Administrators group or similar

Initialise a new disk

Yes (Initialize Disk, GPT by default)

Yes, by creating partitions on a selected disk

Create and format a volume

Yes (New Simple Volume wizard)

Yes (create partition primary, then format)

Extend or shrink a volume

Yes

Yes (extend, shrink)

Change or assign a drive letter

Yes

Yes (assign, remove)

Remove every partition from a disk

Not covered in Microsoft's Disk Management articles

Yes (clean; clean all zeroes every sector)

Convert an empty MBR disk to GPT

Not covered in Microsoft's Disk Management articles

Yes (convert gpt)

Set or clear a disk's read-only attribute

Not covered in Microsoft's Disk Management articles

Yes (attributes disk)

Scripting

No (graphical only)

Yes (the noerr option is for scripts)

How Disk Management works

Microsoft describes Disk Management as a Windows system utility for advanced storage operations. It shows every drive and its partitions, with the size and the space allocated or used. The jobs Microsoft lists are setting up a new drive by initialising it, extending a basic volume, shrinking a basic volume, and changing or assigning a drive letter.

Setting up a new SSD is where it's at its best. Find the disk (bring it Online first if it's offline), right-click it and choose Initialize Disk. Microsoft says the default partition style is GPT, which most computers use for hard drives and SSDs. Then right-click the Unallocated space, choose New Simple Volume, and accept the default size to use the whole drive, pick a drive letter and choose a file system (usually NTFS). Our step-by-step guide to initialising a new SSD covers this in more detail, and MBR vs GPT explains the partition styles.

Disk Management also shows the EFI System and Recovery partitions on your Windows drive. Microsoft warns that Disk Management might show them as 100 percent free, even though they contain critical files and are usually close to full, and recommends that you don't modify them in any way.

If a drive is missing, Microsoft's troubleshooting advice starts in Disk Management: bring an Offline disk online, and for an external drive that isn't showing up, unplug it, plug it back in and select Action > Rescan Disks. Our guide to an SSD not showing up covers the other causes.

How DiskPart works

DiskPart works on whatever has focus. You list disks, partitions or volumes, select one, and every command that follows acts on it until you select something else. Some commands, such as creating a partition, move the focus automatically to the new object. That's DiskPart's biggest risk: if you select the wrong disk, the commands that follow change the wrong disk.

Microsoft's DiskPart page walks through setting up an empty data drive. Here are its steps, with an assign command added at the end to give the new volume a drive letter (check the disk number from list disk first; disk 1 is only an example):

diskpart
list disk
select disk 1
create partition primary
format fs=ntfs label=Backup quick
assign letter=e
exit

create partition primary takes an optional size= in megabytes; without it, the partition uses the rest of the unallocated space in that region. assign gives the volume the next free letter if you don't specify one, but Microsoft notes you can't assign letters to system or boot volumes, or volumes that contain the paging file.

What DiskPart can do that Disk Management can't

  • clean removes all partition or volume formatting from the selected disk. On a GPT disk it overwrites the GPT partitioning information, including the protective MBR. clean all goes further and sets every sector to zero, which Microsoft says completely deletes all data on the disk. That makes it useful for a second-hand drive or USB stick with leftover partitions you want to remove completely. It isn't the same as an SSD secure erase: see our guide on how to secure erase an SSD for that.

  • convert gpt turns an empty basic MBR disk into a GPT disk. Microsoft says the disk must be empty, so back up and delete all partitions first. To convert a Windows system drive without wiping it, use Microsoft's MBR2GPT method in our MBR to GPT conversion guide instead.

  • attributes disk displays, sets or clears a disk's attributes. For example, attributes disk clear readonly removes the read-only flag from the selected disk.

  • rescan, online and offline handle disks that haven't appeared or have been taken offline.

  • Scripting: many commands accept noerr, which Microsoft says is for scripting only and makes DiskPart carry on after an error.

Extending and shrinking: same limits in both

Microsoft's documentation describes the same limits whichever tool you use.

  • Extending needs unallocated space immediately after the volume, on the same drive, and the volume must use NTFS or ReFS. If another partition sits between your C: drive and the free space (for example, a Recovery partition), you can't extend into it. Our guide to extending the C: drive covers that situation.

  • Shrinking works only on volumes with no file system or NTFS. Ordinary files are moved automatically and no data is lost, but files that can't be moved, such as the paging file or shadow copy storage, limit how far a volume can shrink. In DiskPart, shrink desired=<MB> asks for a size, and Microsoft says it falls back to minimum= if the desired amount is too large.

Which should you use?

Job

Best tool

Set up a new internal SSD or hard drive

Disk Management

Change a drive letter

Disk Management (our guide)

Extend or shrink a volume

Disk Management (DiskPart if you prefer commands)

Format an external SSD as exFAT for Mac and PC

Disk Management or File Explorer (our guide)

Wipe a drive that has leftover or protected partitions

DiskPart clean

Convert an empty data drive from MBR to GPT

DiskPart convert gpt

Clear a read-only flag on a disk

DiskPart attributes disk clear readonly

Pool drives together

Neither: use Storage Spaces

Our verdict

For most PC builders, Disk Management is the right tool: it shows every drive and partition, it handles the jobs you'll do most often (initialising a new SSD, creating volumes, extending, shrinking and changing drive letters), and it's much harder to change the wrong drive by mistake. Keep DiskPart for the jobs Disk Management can't do, such as clean to strip every partition from a drive, convert gpt on an emptied disk, and clearing a read-only attribute. When you use it, run list disk and check the disk number and size before every select, because every command acts on whatever has focus. If the free space isn't directly after the volume you want to extend, neither tool can use it, so you'll need third-party partition software.

The bottom line

For most PC builders, Disk Management is the right tool: it shows every drive and partition, it handles the jobs you'll do most often (initialising a new SSD, creating volumes, extending, shrinking and changing drive letters), and it's much harder to change the wrong drive by mistake. Keep DiskPart for the jobs Disk Management can't do, such as clean to strip every partition from a drive, convert gpt on an emptied disk, and clearing a read-only attribute. When you use it, run list disk and check the disk number and size before every select, because every command acts on whatever has focus. If the free space isn't directly after the volume you want to extend, neither tool can use it, so you'll need third-party partition software.

Sources

  1. 01Overview of Disk Management (Microsoft Learn)
  2. 02Initialize new disks (Microsoft Learn)
  3. 03Extend a basic volume (Microsoft Learn)
  4. 04Shrink a basic volume (Microsoft Learn)
  5. 05Change a drive letter (Microsoft Learn)
  6. 06Troubleshooting Disk Management (Microsoft Learn)
  7. 07diskpart (Microsoft Learn)
  8. 08clean (Microsoft Learn)
  9. 09convert gpt (Microsoft Learn)
  10. 10create partition primary (Microsoft Learn)
  11. 11assign (Microsoft Learn)
  12. 12attributes disk (Microsoft Learn)

About the author

Callum Reid

Senior Hardware Editor

Callum leads GPU, CPU and platform architecture coverage at Forge PC. Before joining the editorial desk, he spent nine years specifying, assembling and stress-testing custom gaming and workstation systems in the UK, with a focus on PCIe bandwidth, VRM thermal design, DDR5 memory tuning and 1440p/4K frame-time consistency.

More from Callum Reid

Read next

How to Use Coreinfo to Check Your CPU's Cores, Cache and Features

How-To

How to Use Coreinfo to Check Your CPU's Cores, Cache and Features

Microsoft's free Sysinternals Coreinfo shows how your CPU is really laid out: which logical processors share a core, P-cores and E-cores, cache sizes and sharing, NUMA nodes and supported instruction sets. How to use its graphical and command-line versions, and why its virtualisation check can mislead.

Marcus Thorne6 min

How to Record a Performance Trace in Windows 11 with WPR and WPA

How-To

How to Record a Performance Trace in Windows 11 with WPR and WPA

Windows Performance Recorder can capture exactly what your CPU, drives and drivers were doing when your PC stuttered or slowed down. How to choose a profile, record a trace from the WPR window or the built-in wpr command, record slow boots, and read the results in Windows Performance Analyzer.

Marcus Thorne7 min

How to Run a Local LLM on an NVIDIA Jetson Orin Nano Super

How-To

How to Run a Local LLM on an NVIDIA Jetson Orin Nano Super

Run a private chatbot on an NVIDIA Jetson Orin Nano Super. Why Ollama needs JetPack 6 rather than JetPack 7.2, which storage to use, how to set the MAXN SUPER power mode and how to install Ollama and Open WebUI.

Marcus Thorne6 min

How to Run a Powercfg Energy Report in Windows 11

How-To

How to Run a Powercfg Energy Report in Windows 11

Windows 11's built-in powercfg tool can diagnose power problems. How to run an energy-efficiency report with powercfg /energy, find what's stopping your PC sleeping with /requests, check sleep with /systemsleepdiagnostics, and use SleepStudy on modern standby laptops.

Marcus Thorne6 min