By searching through the web. I found some tutorial about attach a VHD in Hyper-V by PS using the code below:
$objVHDService = get-wmiobject -class "Msvm_ImageManagementService" -namespace "root\virtualization" -computername "." $objVHDService.Mount("d:\virtuals\demo1\demo1.vhd")
I try this in Windows 7. But it show me "Invalid namespace".
Then I try to get the class only
$objVHDService = get-wmiobject -class "Msvm_ImageManagementService"This time it show me "Invalid class". Is the PS in Hyper-V different to the one in Win 7 ?