Hyper-V cmdlets in Windows Server 2012 R2

Welcome Forums General PowerShell Q&A Hyper-V cmdlets in Windows Server 2012 R2

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

 
Participant
4 years, 5 months ago.

  • Author
    Posts
  • #17066

    Participant
    Points: 1
    Rank: Member

    I downloaded the Codeplex ones but I have to reinstall the module every time I open a new PS window. Are there no native Hyper-V cmdlets in WS2K12 R2? If there is, how do you enable/load them?

  • #17067

    Participant
    Points: 0
    Rank: Member

    You need to either have Hyper-V installed or the RSAT tools for Hyper-V installed to get access to the cmdlets.

  • #17070

    Keymaster
    Points: 1,704
    Helping HandTeam Member
    Rank: Community Hero

    You can also use a profile (help about_profile*) to automatically load a desired module into memory each time you open a new shell window.

    That said, you *should* have modules installed in one of the paths where PowerShell looks for them. That way, you don't have to load them (it isn't "installing," it's just loading into memory). In v4, "Program Files\WindowsPowerShell\Modules" is one of the correct paths.

    But, Richard is correct – you'll want to use the native ones. They only "auto load," though, because they're put into one of the correct paths. They're not special just because they're native.

  • #17072

    Participant
    Points: 324
    Helping Hand
    Rank: Contributor

    Add-WindowsFeature RSAT-Hyper-V-Tools -IncludeAllSubFeature

  • #17093

    Participant
    Points: 1
    Rank: Member

    Thanks Rob, that worked.

The topic ‘Hyper-V cmdlets in Windows Server 2012 R2’ is closed to new replies.