We have a number of Win10 .vhdx disks provisioned at the default of 127Gb but I would like to reduce the maximum to a more sensible 40Gb. Some disks have shrunk fine but others, for no apparent reason, will not shrink at all.
I have shrunk the size of the main partition fine but the unallocated space doesn't seem to get seen by the .vhdx. The shrink option is just not available when running Hyper-v's 'Edit Disk' on these virtual disks. Running Get-VHD shows the MinimumSize is the same as Size.
How do we get the unallocated space recognised by Hyper-V Shrink?
The solution I found in the end was to use to boot from the 'MiniTool Partition Wizard 9.1' .iso and move the Windows 10 Recovery partition. This worked fine on all VMs.