1

I'm new to PowerShell and am having trouble finding the Convert-VHD command. I expected google to tell me that I needed to install a SDK - but can't find any instructions.

The help page suggests that it's already installed on Win 8.1 (my operating system). If so, where is it? https://technet.microsoft.com/en-us/library/hh848454(v=wps.630).aspx

Help appreciated.

Matt Fitzmaurice
  • 1,319
  • 4
  • 19
  • 40
  • doesn't work. the whole hyper-V feature is required Install-WindowsFeature –Name Hyper-V -IncludeManagementTools -Restart This most likely won't work on a VM making it impossible to convert vhdx to vhd from a VM. thanks a lot Microsoft – andocromn Mar 23 '17 at 21:32
  • The VM part is irrelevant. In fact, you can convert VHDX to VHD without ever concerning yourself with a VM. What is important is that Hyper-V is available and enabled. It's only available on the Pro 64-bit and the Enterprise 64-bit edition. So if any other edition is used or if wrong bitness is used then it's expected to fail, so don't be surprised if it doesn't work. – Samir Feb 13 '21 at 15:05

1 Answers1

3

You have to import the ServerManager module

Import-Module ServerManager

Of course you have to install it, you can find it as a feature named Hyper-V Module for Windows PowerShell

enter image description here

This should be the code to install the module from Powershell

Add-WindowsFeature RSAT-Hyper-V-Tools –IncludeAllSubFeature
Naigel
  • 9,086
  • 16
  • 65
  • 106
  • 1
    Um, those server Cmdlets won't work on Windows 8.1. Enabling the tools is the right solution though (so you're partially right) – bluuf Aug 11 '15 at 10:17
  • I have traveled back from the future to deliver the good news that `Convert-VHD` is available on Windows 10 Pro. So it should be available in the present time on Windows 8.1 as well as Windows 8.0, under the condition that you are using the Pro 64-bit or the Enterprise 64-bit edition and that Hyper-V is enabled. Only these editions include the Hyper-V, and with it the `Convert-VHD` cmdlet. – Samir Feb 13 '21 at 14:59