Forum Discussion
Increase the size of user profile disk in my remote desktop server
- Mar 11, 2025
hi szuguan,
What you need to do is easy, you launch dispart, you execute the commande "select vdisk file=<VHDX>" and you execute the commande "expand vdisk maximum=<New size disk>" and after that you attach the disk in disk manager and extend the disk.
Example:
Hi, it looks like the issue is that there isn’t any unallocated space immediately following the partition inside the VHDX. When “Extend Volume” is grayed out in Disk Management, it’s usually because there’s no adjacent free space available.
For Diskpart, instead of using “list volume”, try “list partition” after attaching the VHDX. Often, especially in VHD files, the partition you need to extend appears in the partition list rather than the volume list.
Try these steps:
Attach the VHDX:
select vdisk file="PathToYourFile.vhdx"
attach vdisk
Check for partitions:
list partition
If you see the partition you want to extend, select and extend it:
select partition X
extend
(Replace X with the correct partition number.)
Additionally, ensure that:
-The VHDX file itself has been expanded (right-click > properties in Hyper-V or use PowerShell).
-The partition inside the VHDX has space to expand.
-If there’s no unallocated space, you’ll need to first increase the VHDX file size before extending the partition.
- szuguanMar 11, 2025Copper Contributor
Hi,
From File Explorer, I can see there is free space:
When I do "list partition", it only shows 1 partition which I think is this one:
Next, I select the partition and type "extend", it says not enough free space:
I am totally out of idea, please advise.