This little HowTo shows you how you can attach or detach VHDs (Virtual Hard Disk) in Windows Server 2008 R2 or Windows 7. Basically you can use the Disk Management in the Server Manager to do that.
- Open Disk Management

- Now click on “More actions” and “Attach VHD”

- Now you can choose the VHD you want to attach

- As you can see you have now a new Virtual Hard Drive in your Disk Management
- To Detach the VHD right click on it and click on “Detach VHD”
You can also attach and detach VHD’s via diskpart.exe
Attach VHD via Diskpart.exe
diskpart select vdisk file="D:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\data.vhd" attach vdisk
Detach VHD via Diskpart.exe
diskpart select vdisk file="D:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\data.vhd" attach vdisk




