System partition C is very likely to become full if you install everything onto it. Even if you install all your programs and some Windows services on the D drive, it can also run out of space. In that case, you can increase the size of the D drive by moving free space from another volume on the same disk. There are several ways to increase the D drive size using Windows native tools and disk partition software. This article explains how to increase D drive space in Windows Server 2016/2019/2022 without losing data.

Increase D Drive Space With Built-in Disk Management
Starting from Windows Server 2008, there is a built-in "Extend Volume" function in the Disk Management tool, which can help you extend NTFS partitions without losing data. However, you can only increase D drive space in Server 2016/2019/2022 using Disk Management if your disk partition configuration meets all of the requirements below:
- There must be another partition (such as E:) on the right side of the D drive.
- You must delete the adjacent partition (E:).
- There must be enough free space on another volume to save all files from drive E.
- Both drives D and E must be either Primary or Logical partitions.
- Drive D must be formatted with the NTFS file system.
To Increase D Drive Space in Windows Server 2016/2019/2022 via Disk Management:
- Transfer all files from the right contiguous partition E to another location.
- Press the Windows and X keys together on your keyboard, then click Disk Management from the list.
- Right-click drive E and select Delete Volume.
- Right-click drive D and select Extend Volume.
- Simply click Next until you reach Finish in the pop-up Extend Volume Wizard window.
Although there is a "Shrink Volume" function, Disk Management cannot expand the D drive by shrinking any other volumes. (Learn why)
How to Increase D Drive Size With DiskPart Command Line
DiskPart runs from the command prompt and features many commands. Unlike Disk Management, if the adjacent partition on the right (E:) is a Primary partition, you can delete it to expand the D drive using DiskPart, regardless of whether D is a Primary or Logical partition.
To Increase D Drive Space in Windows Server 2016/2019/2022 via DiskPart:
- Transfer all files from drive E to another partition manually.
- Press the Windows and R keys together on your keyboard, type diskpart, and press Enter.
- Type list volume and press Enter in the DiskPart command prompt window.
- Type select volume E and press Enter.
- Type delete volume and press Enter.
- Type select volume D and press Enter.
- Type extend and press Enter.
However, if D is a Primary partition and E is a Logical partition, you must perform two additional steps before step 6:
- Type select partition E_Number (replace E_Number with the actual partition number) and press Enter.
- Type delete partition and press Enter.
Correction Note: The original instruction to use `select partition 0` is dangerous and technically incorrect. Partition 0 typically represents the entire disk or a critical system partition depending on the context and OS version. Deleting it can cause catastrophic data loss. You must select the specific logical partition number corresponding to the volume you wish to remove before executing the `delete partition` command to remove the extended partition container if necessary.
A Better Way to Increase the Size of the D Drive With Partition Editor
With NIUBI Partition Editor, there are no such limitations, making it extremely easy to increase D: drive space in Windows Server 2016/2019/2022. Most importantly, you can increase the size of D without deleting any other volume.
Download NIUBI Partition Editor and follow the steps in the video to increase the D drive size by shrinking C or E:
Learn more detailed information about extending the D drive in Windows Server 2016.

