CoreCLR's Blog

Archive for the ‘Windows 7’ Category

Windows 7 VHD Script

Posted by coreclr on September 24, 2009

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)

Posted in Windows 7 | Leave a Comment »