keepcalculator

06 Numbers and Powers

Disk Management Command: Full Guide

Card No. 06·69189 · Updated · Standard formula, shown below

The disk management command is diskmgmt.msc, a Windows utility that lets you view, create, format, shrink, and manage disk partitions on your computer. You can launch it by typing diskmgmt.msc into the Run dialog (Win+R) or the Start menu search bar, then pressing Enter.

What Is Disk Management?

Disk Management is a built-in Microsoft Management Console (MMC) snap-in that provides a graphical interface for managing hard drives, SSDs, and removable storage. It shows each physical disk as a row at the bottom and each partition as a block within that row. From this view you can perform most partition-related tasks without third-party software.

The tool is present in every modern Windows version, including Windows 10 and Windows 11. It works with disks that use the traditional Master Boot Record (MBR) or the newer GUID Partition Table (GPT). It also handles basic disks and dynamic disks, though dynamic disks are deprecated in current Windows releases.

How to Open Disk Management

There are several ways to open the disk management command, and the best one depends on your situation:

  • Run dialog: Press Win+R, type diskmgmt.msc, and press Enter.
  • Start menu: Click the Start button, type “disk management” or “create and format hard disk partitions,” and select the matching result.
  • Power User menu: Right-click the Start button (or press Win+X) and choose “Disk Management.”
  • Command Prompt: Open Command Prompt and type diskmgmt.msc to launch the GUI tool.
  • Computer Management: Type compmgmt.msc in the Run dialog, then navigate to Storage → Disk Management.

If you need administrative privileges, Windows will prompt you for confirmation. Disk Management requires admin rights to make changes, but you can view the layout without them.

What Can You Do With Disk Management?

The disk management command gives you control over partitions and volumes. Here are the primary actions you can perform:

  • View disk health and layout: See the total capacity, free space, file system, and status of each partition.
  • Create a new partition: Right-click unallocated space and choose “New Simple Volume” to format a new drive letter.
  • Format a partition: Right-click a volume, choose “Format,” and select the file system (NTFS, exFAT, FAT32) and allocation unit size.
  • Shrink a volume: Reduce the size of a partition to free up unallocated space, useful for creating a dual-boot setup.
  • Extend a volume: Add unallocated space to an existing partition, provided the space is directly adjacent to it.
  • Change drive letters: Assign or change the letter of a partition or removable drive.
  • Mark a partition as active: Set the system partition for booting (rarely needed on modern UEFI systems).
  • Convert disk type: Convert a basic disk to dynamic or MBR to GPT, though these operations have limitations.

Disk Management does not allow you to resize partitions beyond what the free space permits, and it cannot move partitions. For more flexible resizing, you would need a third-party partition manager.

Common Disk Management Tasks

Here are step-by-step instructions for the most frequent operations:

Create a New Partition

  1. Open Disk Management.
  2. Find unallocated space (shown as a black bar).
  3. Right-click it and select New Simple Volume.
  4. Click Next, specify the size in MB, then assign a drive letter.
  5. Choose a file system (NTFS is typical for Windows) and click Finish.

Shrink a Partition

  1. Right-click the partition you want to shrink (e.g., C:) and choose Shrink Volume.
  2. Enter the amount of space to shrink in MB (the tool shows the maximum available).
  3. Click Shrink. The freed space appears as unallocated.

Extend a Partition

  1. Right-click the partition you want to extend and choose Extend Volume.
  2. The unallocated space must be immediately to the right of the partition on the same disk.
  3. Select the space and click Next, then Finish.

If the Extend Volume option is greyed out, the unallocated space is not adjacent or the partition is not NTFS.

Disk Management Command-Line Alternatives

While diskmgmt.msc is the graphical command, Windows also offers command-line tools that can be used in scripts or when the GUI is not available:

  • DiskPart: A text-mode utility that can create, delete, format, and assign letters to partitions. You run it by typing diskpart in an elevated Command Prompt. It is more powerful but requires careful syntax.
  • PowerShell cmdlets: Commands like Get-Disk, New-Partition, and Format-Volume allow you to manage disks from PowerShell scripts.
  • WMIC: The older wmic diskdrive command provides basic disk information but is deprecated in newer Windows versions.

For most users, the graphical Disk Management is easier and safer. DiskPart is useful for automating tasks or when the GUI fails to load.

Common Problems and How to Fix Them

Disk Management can encounter issues. Here are typical problems and their solutions:

  • “Cannot connect to Virtual Disk Service” error: Restart the Virtual Disk service (run services.msc, find “Virtual Disk,” and restart it). If that fails, reboot.
  • Extend Volume greyed out: The unallocated space must be directly adjacent to the partition. If it is not, you need a third-party tool to move partitions.
  • Shrink Volume shows very little space: Windows may not allow shrinking past unmovable files (like page files or hibernation files). Disable hibernation and page file temporarily, then shrink.
  • Disk shows as “Unknown” or “Not Initialized”: Right-click the disk and choose “Initialize Disk.” Choose GPT if the disk is 2 TB or larger, otherwise MBR.
  • Drive letter not showing: Right-click the partition and choose “Change Drive Letter and Paths” to assign a letter.

If you see a partition with a yellow triangle icon, it means the partition is not healthy; right-click it and choose “Mark Partition as Active” only if it is the system partition.

Frequently Asked Questions

Is Disk Management safe to use?

Yes, for basic tasks like creating or formatting a partition. However, any operation that deletes or resizes a partition carries a risk of data loss. Always back up important data before making changes. Disk Management will warn you before destructive actions, but it is still possible to accidentally select the wrong disk.

What is the difference between Disk Management and DiskPart?

Disk Management is a graphical tool that is easier for beginners. DiskPart is a command-line tool that offers more advanced options, such as scripting and detailed control over partitions. DiskPart also works in Windows PE and recovery environments, which is useful for troubleshooting.

How do I format a USB drive using Disk Management?

Insert the USB drive, open Disk Management, right-click the drive’s partition, and choose “Format.” Select the file system (exFAT for large files or compatibility with Mac and Windows, NTFS for Windows-only), set the allocation unit size to Default, and click OK. Note that formatting erases all data on the drive.

Why can’t I shrink my C: drive more?

Windows can only shrink a volume by the amount of free space that is contiguous and not occupied by system files like the page file, hibernation file, or System Restore points. You can temporarily disable these features, shrink, and then re-enable them, or use a third-party partition manager that can move these files.

Can I use Disk Management to clone a hard drive?

No, Disk Management does not have a clone function. To clone a drive, you need dedicated cloning software or use the system image backup feature in Windows. Disk Management only handles partitions and volumes, not full disk images.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →