Using PowerShell to Convert a VHD to a VHDX

Yesterday I showed you how to convert a VHD file to a VHDX using the Hyper-V Manager user interface. Today I want to show you that it is even easier to do using PowerShell:


All you need to do is run the following command:

Convert-VHD .\test.vhd .\test.vhdx

We will figure out whether you want the new file to be a VHD or VHDX depending on the file extension that you provide.  You can also specify whether you want a dynamic or fixed disk – but that is optional.