How to merge Hyper-V AVHDX files that do not appear in the GUI

# Lists all VHDX files and finds the youngest child AVHDX
$vhds = get-item *.avhd | get-vhd ; $v = $vhds | ? path -notin $vhds.parentpath
#Takes the Path and parent path from the $v variable and use the merge-vhd cmdlet to merge them.
merge-vhd -Path $v.Path -DestinationPath $v.ParentPath 

Leave a Reply

Your email address will not be published. Required fields are marked *