Diskpart shrink volume on Windows Server 2012

Updated on: November 16, 2019

This page introduces how to shrink volume with Diskpart command in Windows Server 2012 R2, and the method if diskpart cmd cannot shrink partition.

How to shrink volume with Diskpart command

DiskPart is a Windows native disk partition management tool that running via command prompt. It is able to create, delete, format, convert, shrink and extend volume, etc.

To open this tool: press Windows and R on the keyboard, type diskpart and press Enter. In the diskpart.exe command prompt window, type "?" and you'll see all commands. In this article, I just talk about how to shrink partition with Diskpart cmd on Windows 2012 Server.

Comparing with GUI Disk Management tool, Diskpart is easier and faster. However, there is a disadvantage: it only lists all single partitions without structure. To better show you how Diskpart Shrink command works, I open both tools at the same time.

Steps to shrink partition with Diskpart cmd in Windows Server 2012:

Step:1 Type list volume and press Enter in Diskpart command prompt window, then you'll see all partitions.

List volume

Step:2 Type select volume 2 and press Enter to give focus to C drive.

Step:3 Type shrink desired=10240 and press Enter. Diskpart reports successfully shrunk this volume by 10GB.

Partition C shrank

If you want to shrink drive D, repeat from Step 1.

Partition D shrank

You can't shrink drive E because it is a FAT32 partition, you'll receive error message that "The volume cannot be shrunk because the file system does not support it."

Cannot shrink

Restrictions when shrinking partition with Diskpart

Typing help shrink , Diskpart lists the restriction of Shrink command including:

If you want to extend other partition after shrink, neither Diskpart Extend command nor Disk Management can help you. Because Unallocated space can't be combined to the right contiguous or any nonadjacent partitions. Learn why can't extend volume in Server 2012 Disk Management.

Better way to shrink drive with NIUBI

It is better to shrink partition in Windows 2012 Server with NIUBI Partition Editor. Comparing with Diskpart Shrink command, NIUBI has advantages such as:

Download NIUBI Partition Editor and follow the steps in the video to shrink and extend partition in Windows Server 2012:

Video guide