Updated scripts are here http://www.ravichaganti.com/blog/?p=241
Virtual Server 2005 had a tool to mount and unmount VHD files. MS, so far, has not given this tool with hyper-V. However, they published WMI interfaces for doing the same.
So, here is a small script that enables Mount/Unmount options in the context menu when you right-click on a .VHD file. I am currently not handling any errors. This will fail if you try to mount / unmount a VHD in use. I am looking at WMI interfaces to understand how I can put some checks in to the script.
To use this script (Works only on LH system with Hyper-V or any system that has Hyper-V WMI interfaces),
1. Unzip the contents to desktop
2. Copy vhdmount.vbs to c:\
3. Double-Click on HV-Reg.reg and export the contents to Windows Registry
4. Right-Click on a .VHD file and you can see mount and dismount options
You can download the script here

{ 1 comment… read it below or add one }
Hey wonderful script you created here. Works like a charm and saves alot of time.
Thanks
{ 1 trackback }