I just made another release of VHDShellExt.vbs on MSDN Code Gallery. In this new release, I mostly concentrated on some error checking around the input boxes and added “Merge VHD” feature. Also, enabled all the shell extensions for AVHD files also. So, after you update this release, you will have to run setup once again.
cscript.exe VHDShellExt.vbs /action:Setup
Once the setup is complete, you should see the below context menu on every right-click on a VHD or a AVHD file.
Word of caution
AVHD files are the snapshot files. You should manually merge snapshots in to a VHD file only when it is extremely necessary. The manual merge of snapshots in to a VHD of a functional VM will cause the VM to fail. This is because the references to VM snapshots are still left in the XML files while a manual merge option deletes the AVHD files after a merge. If you are trying to merge the snapshots of a functional VM, it is recommended that you select “No” when prompted to merge in to the immediate parent and create a new VHD.
For any functional VM, deleting snapshots from Hyper-V MMC is the best method to merge snapshots in to the VM’s VHD file.