Diskpart to Shrink Volume in Windows Server 2019/2022

by John, Updated on: June 16, 2026

If you want to decrease the size of an allocated partition in Windows Server 2019/2022, you may use Windows built-in tools or third-party optimization software. Native system utilities include Disk Management and the Diskpart command interpreter. Disk Management provides a standard graphical layout workspace; follow the alternative guide to shrink partition parameters in Server 2019 with Disk Management layouts. In this article, I will show you how to shrink partition with diskpart in Windows Server 2019/2022 environments safely. While many data administrators prefer running command line utilities, Diskpart introduces several severe architectural limitations when managing volume reduction boundaries.

How to shrink partition with diskpart in Windows Server 2019/2022

  1. Press Windows and R together on your keyboard, type diskpart, and press Enter to initialize the native command prompt window.
  2. Type list volume within the active console workspace and press Enter.
  3. Type select volume D and press Enter, replacing D with the specific drive index number or letter path of the partition you want to shrink.
  4. Type shrink desired=XX and press Enter to reduce block parameters. (XX represents the specific target reduction allocation value in megabytes.)

Run the list volume command once more. As displayed on the parameter table, drive D successfully shrinks down from 70GB to 50GB.

Altering allocation thresholds through built-in scripts is fast, but the underlying diskpart command utility lacks total system flexibility due to core architectural restrictions.

Diskpart shrink

Limitations of diskpart to shrink volume in Windows Server 2019/2022

1. Only NTFS partition is supported

The native shrink mechanism exclusively operates on block structures formatted with the NTFS filesystem layout or structured as unallocated RAW blocks. If you attempt a partition reduction routine on FAT32 or alternative file allocation tables, the interpreter throws an error exception: "The volume cannot be shrunk because the file system does not support it."

Diskpart shrink error

2. Unallocated space can only be made on the right

The diskpart terminal text-only display only organizes active volumes in a basic index list, omitting unallocated sector blocks entirely. When reducing drive boundaries through command lines, the utility simply modifies sector values and records if the partition successfully shrunk. Following this modification, the newly generated unallocated space block is situated strictly on the right boundary of the drive.

This layout restriction is harmless if your only goal is creating secondary new volumes from the unallocated sectors. However, it presents a severe blockage if you intend to extend another drive allocation with the reclaimed capacity. Whether running Disk Management or the native diskpart extend command, the system can only extend unallocated blocks to a left contiguous partition layout. In short, these two built-in management tools cannot extend a partition by shrinking an alternative partition on the same hard disk.

3. Sometimes it can only shrink little space

When unmovable operational files reside on the system disk, reducing the C drive layout via native command scripts can trigger an exception: "The specified shrink size is too big." The built-in sector contraction engine cannot alter boundaries past the block index location where unmovable system fragments exist.

Better way to shrink partition in Windows Server 2019/2022

These rigid layout blockages do not exist when deploying third-party storage optimization software, where you can simply adjust boundaries directly on the interactive disk map. However, because altering partition sizes modifies raw sectors, maintaining a comprehensive data backup and using trusted partition applications is essential to eliminate data loss and database crash risks.

Outperforming conventional applications, NIUBI Partition Editor integrates advanced data protection architectures to secure enterprise system layers:

Download NIUBI Partition Editor and follow the actions demonstrated in the video tutorials to adjust layouts securely:

Steps to extend system partition C by shrinking other volume allocations:

Video Server 2019

Steps to extend D drive by shrinking alternative data partitions:

Video Server 2019

Beyond shrinking and extending volumes in Windows Server 2025/2022/2019/2016/2012/2008/2003, this versatile server partition software provides a comprehensive toolkit for secure volume copying, file system optimization, data erasing, and disk conversion tasks.

Download