Diskpart shrink partition in Windows Server 2016

Published on: November 16, 2019

This article introduces how to shrink partition C/D with diskpart in Windows Server 2016 and what to do when cannot shrink volume with diskpart command line.

Many server administrators want to shrink partition after running the server for a period of time, for example: shrink a large volume to create new, or shrink D drive to expand system partition. Many administrators like to use command line tool, so this article introduces how to run diskpart to shrink C drive or any data volume in Windows 2016 server.

How to shrink partition with diskpart command

It is very easy to shrink partition with diskpart in Windows Server 2016, follow the steps below:

  1. Press Windows and R together on the keyboard to open Run, type diskpart and press Enter.
  2. Type list volume and press Enter in diskpart.exe command prompt window.
  3. Type select volume C and press Enter. (C is the drive letter or number of the partition that you want to shrink)
  4. Type shrink desired=20480 and press Enter. (20480 is the amount of space to shrink in MB)

In a short time, diskpart reports successfully shrunk my C: drive by 20GB.

If you type shrink without specifying the amount in step 4, diskpart will shrink this partition with maximum available space.

Shrink with diskpart

Shortages to shrink volume with diskpart in Server 2016

It is indeed yes to shrink volume with diskpart in Windows Server 2016, but not all partitions can be shrunk. In fact, there are many shortages while shrinking partition with diskpart command line.

  1. It can only shrink NTFS partition. If you shrink FAT32 and any other types of partitions, you'll receive error message "The volume cannot be shrunk because the file system does not support it."
  2. If you specified an amount to shrink but there's not enough available free space, you'll receive Virtual Disk Service error: "The specified shrink size is too big and will cause the volume to be smaller than the minimum volume size." You may encounter this issue while shrinking C drive and there are some "unmovable" files located in it. (learn why cannot shrink volume)
  3. The free Unallocated space shrunk from a partition cannot be extended to other volume, no matter you want to shrink D to expand C drive or shrink C to expand D drive. When you run diskpart extend command after shrinking any partition, you'll receive error "There is not enough usable free space on specified disk(s) to extend the volume."

When you cannot shrink C: drive with diskpart in Windows Server 2016, cannot shrink FAT32 partition, or cannot extend volume after shrinking another one, run NIUBI Partition Editor.

Better way to shrink C or D drive in Windows Server 2016

Windows Server 2016 has another native Disk Management tool, which has GUI Shrink Volume function, but it has same limitations. Comparing with diskpart command and Disk Management, NIUBI Partition Editor is better choice because:

Download NIUBI Partition Editor and follow the steps in the video.

How to extend C: drive by shrinking other volume:

Video guide

How to extend D: drive by shrinking other volume:

Video guide

  • If you want to shrink partition and extend another non-adjacent volume, there's an additional step to move partition.
  • There's no difference if you run physical server with SSD, HDD, RAID array or virtual server in VMware/Hyper-V.
  • If the partitions that you want to shrink and extend are on different disks, follow the steps to copy disk to a larger one.

Besides shrinking and extending partitions, NIUBI Partition Editor helps move, merge, clone, convert, defrag, wipe, hide partition, scan bad sectors and much more.