The Resize-VHD cmdlet resizes a virtual hard disk. This cmdlet lets you shrink or expand the size of a virtual hard disk, but the shrink operation is allowed only on VHDX virtual hard disks.
Resize-VHD is an offline operation; the virtual hard disk must not be attached when the operation is initiated.
So the correct answer is A – Dismount-VHD, then you can convert it to vhdx and then resize (shrink).
https://technet.microsoft.com/en-us/library/hh848535.aspx
The Resize-VHD cmdlet resizes a virtual hard disk. This cmdlet lets you shrink or expand the size of a virtual hard disk, but the shrink operation is allowed only on VHDX virtual hard disks.
Resize-VHD is an offline operation; the virtual hard disk must not be attached when the operation is initiated.
So the correct answer is A – Dismount-VHD, then you can convert it to vhdx and then resize (shrink).
0
0
I will go with Convert-VHD
I do not find dismount-VHD cmdlet in PS though one of the MS documents mention about it.
Not sure what OS version this applies to : https://technet.microsoft.com/en-us/itpro/powershell/windows/hyper-v/dismount-vhd
I can find dismount-diskimage which can remove VHD.
Or the other option is via GUI to detach VHD.
https://www.sapien.com/powershell/cmdlet/230/dismount-diskimage/ModuleName
https://social.technet.microsoft.com/Forums/windowsserver/en-US/cb9d20d8-264b-4a75-affc-e4360ab9dd55/cant-dismount-vhd?forum=winserver8gen
0
0