none
VHD to VHDX using Powershell RRS feed

  • Question

  • Hello,

    Can somebody give me the exact command for powershell to convert my vhd file to vhdx.

    The path for the vhd is: e:\PeartITServerHardDisk.vhd

    I would like to convert it back onto "e:\" please.

    Thank you,

    Sam.

    Thursday, November 5, 2015 9:57 AM

Answers

  • I am afraid that this cmdlet is available in Hyper-V module in at least Win8/Win2k12 to do that

    On Win8/Win2k12 or higher please install Hyper-V management tools first: http://www.tomsitpro.com/articles/hyper-v-powershell-cmdlets,2-779.html

    the cmdlet should work then

    M.


    • Edited by MStoppl Thursday, November 5, 2015 11:14 AM
    • Marked as answer by Smaddock Tuesday, May 10, 2016 10:53 AM
    Thursday, November 5, 2015 11:11 AM

All replies

  • Convert-VHD https://technet.microsoft.com/en-us/library/hh848454(v=wps.630).aspx

    M.

    Thursday, November 5, 2015 10:01 AM
  • Hello I followed that example before but I just could not get it to work.
    Thursday, November 5, 2015 10:13 AM
  • What operating system do you have? Would you send here a cmdlet you've typed? What error did you get?

    M.

    Thursday, November 5, 2015 10:57 AM
  • PS C:\Users\Learner3> Convert-VHD -e:\PeartITServerHardDisk.vhd -e:\PeartITServerHardDiskVHDX.vhdx
    The term 'Convert-VHD' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
     spelling of the name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:12
    + Convert-VHD <<<<  -e:\PeartITServerHardDisk.vhd -e:\PeartITServerHardDiskVHDX.vhdx
        + CategoryInfo          : ObjectNotFound: (Convert-VHD:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException

    PS C:\Users\Learner3>

    Thursday, November 5, 2015 11:08 AM
  • Windows 7 Pro 64bit SP1
    Thursday, November 5, 2015 11:10 AM
  • I am afraid that this cmdlet is available in Hyper-V module in at least Win8/Win2k12 to do that

    On Win8/Win2k12 or higher please install Hyper-V management tools first: http://www.tomsitpro.com/articles/hyper-v-powershell-cmdlets,2-779.html

    the cmdlet should work then

    M.


    • Edited by MStoppl Thursday, November 5, 2015 11:14 AM
    • Marked as answer by Smaddock Tuesday, May 10, 2016 10:53 AM
    Thursday, November 5, 2015 11:11 AM
  • No the issue is in the syntax:

    Note that it is “ConvertTo-MvmcVirtualHardDisk “, not “ConvertTo-VirtualHardDisk”, as written in the MVMC_cmdlets.doc’s examples.

    https://henrywrites.wordpress.com/2015/02/01/how-to-convert-vmware-vmdk-to-hyper-v-vhdx/comment-page-1/

    OK sorry I have seen, that is regarding another convertion. But in my case I had the issue as well and it must be set in front of the cmdlet a .\ and than it is running.
    Sunday, November 11, 2018 12:31 PM