Diskpart Shrink Volume on Windows Server 2012 R2

by John, Updated on: September 14, 2026

This article explains how to shrink a volume using the diskpart command on Windows Server 2012 R2, the limitations of the diskpart command, and a better method for shrinking partitions on Windows Server 2012/2016/2019/2022/2025.

How to Shrink Volume with Diskpart Command

DiskPart is a native Windows disk partition management tool that runs via the command prompt. It can create, delete, format, convert, shrink, and extend volumes, among other tasks. To open this tool, press the Windows key + R on your keyboard, type diskpart, and press Enter. In the diskpart.exe command prompt window, type "?" to see a list of all commands. This article focuses on how to shrink a partition using the DiskPart command on Windows Server 2012.

For advanced administrators, the DiskPart command-line tool might be more direct and faster compared to the GUI-based Disk Management tool. However, there is a disadvantage: it only lists individual partitions without showing their structure. To better demonstrate how the DiskPart Shrink command works, the steps below show both tools opened at the same time.

Steps to shrink partition with Diskpart on Windows Server 2012 R2:

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

List volume

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

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

Partition C shrank

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

Partition D shrank

You cannot shrink the E drive because it is a FAT32 partition; you will receive the error message: "The volume cannot be shrunk because the file system does not support it."

Cannot shrink

Restrictions When Shrinking Partition with Diskpart

By typing help shrink, Diskpart lists the restrictions of the Shrink command, including:

If you want to extend another partition after shrinking, neither the Diskpart extend command nor Disk Management can help you. This is because unallocated space cannot be combined into the adjacent partition on the right or any non-adjacent partitions. Learn why you cannot extend a volume in Server 2012 Disk Management.

Better Way to Shrink Drive with NIUBI

It is better to shrink partitions in Windows Server with NIUBI Partition Editor. Compared to 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

Compared to other disk partition tools for Windows Server, NIUBI Partition Editor is much safer and faster because of its powerful technologies: