Mount-VHD requires Hyper-V role

Welcome Forums General PowerShell Q&A Mount-VHD requires Hyper-V role

This topic contains 3 replies, has 3 voices, and was last updated by

2 years, 11 months ago.

  • Author
  • #19008

    Points: 1
    Rank: Member

    Not really a question, unless someone can provide a better way to do this.

    VM is Server 2012 R2.

    I have a VM that creates VM's using Hyper-V PowerShell management tools, I now have the need to mount a vhd to manipulate the filesystem. Mount-VHD would work with annoyingly have to install the Hyper-V role.Since I'm already inside a VM, this didn't work and I have to use:
    Enable-WindowsOptionalFeature –Online -FeatureName Microsoft-Hyper-V –All

    Once the VM has restarted I was then able to mount vhd's on this machine.

    What I can't understand is Explorer / the shell, can mount a vhd by simply double clicking it, but to use mount-vhd I had to install the Hyper-V role.

    Thought I'd post this, if anyone else has this issue.

  • #19009

    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

    Well, the commands have to come from somewhere. Server-side, they're installed along with their role. But on a client computer, you could install the RSAT, which includes the server commands.

  • #19010

    Points: 1
    Rank: Member

    The RSAT tools were already installed, Mount-VHD seems to specifically require the role to be installed.

  • #38227

    Points: 0
    Rank: Member


    You always can use analogic cmdlet:

    Mount-DiskImage -ImagePath "\\myserver\share\file.vhd"
    Dismount-DiskImage -ImagePath "\\myserver\share\file.vhd"

The topic ‘Mount-VHD requires Hyper-V role’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort