2

I would like to create a VHD (virtual disk). I know this can be done with diskpart

create vdisk file C:\w7.vhd maximum 10

However I am trying to do it with PowerShell. I found the New-VHD Cmdlet, however it appears to only work with Windows 8 and I am using Windows 7. How can I use New-VHD with Windows 7, or failing that is another way available?

4
  • Did you install PowerShell 4.0 (which is the version that command is valid for)? To get it on Windows 7 you'll need to install the Windows Management Framework 4.0. Apr 28, 2014 at 20:21
  • @techie007 I already have that installed, no dice.
    – Zombo
    Apr 28, 2014 at 20:51
  • I wonder if you would get the new-vhd commandlet if you installed the Hyper-V Remote Administration tools.
    – Zoredache
    Apr 28, 2014 at 23:40
  • @Zoredache where is that
    – Zombo
    Apr 28, 2014 at 23:43

2 Answers 2

1

An alternative that works for me is to use VirtualBox to create the VHD

create

And Windows 7 installer to format it

format

1

Indeed, the New-VHD CmdLet is only available for Windows Server 2012 R2 and Windows 8.1.

Info:

Thus, you should use diskpart or the GUI to create a VHD. Notice you can use diskpart in a script. Here are two posts that should help you :

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .