If you use VHD in Windows 7, you will find Harry Pierson’s PowerShell script very useful.
So instead of writing this every time:
bcdedit /copy {originalguid} /d "Windows 7"
bcdedit /set {newguid} device vhd=[D:]\Image.vhd
bcdedit /set {newguid} osdevice vhd=[D:]\Image.vhd
bcdedit /set {newguid} detecthal on
We can just start PowerShell and run:
.\add-bcd-vhd.ps1 Windows 7 D:\Image.vhd
(Note use "Set-ExecutionPolicy unrestricted" to set the Execution Policy)