Cannot extend Windows non-system partition

Below is a screenshot of the Disk Management tool:

enter image description here

I'm trying to expand my Data (D:) partition, but the 'Extend Volume' option is greyed out. I have tried to extend the volume in command prompt using diskpart but the following error code was thrown: There is not enough usable free space on specified disk(s) to extend the volume.

Is there any way to extend that partition?


The D: partition is at the end of the disk, so cannot be extended beyond the end.

You need to move the partition so that the Unallocated space follows the partition, and then the extend option will become available.

Just to warn that an error in partition move can destroy the data on the disk, if partitions are over-written, so best to ensure that you have excellent backups for the whole disk before starting.