次の方法で共有


Why are there two Hyper-V PowerShell modules in Windows 10?

If you use get-module in PowerShell on Windows 10 - you will see that there are now two Hyper-V PowerShell modules:

There is an important reason for this.

In the past we have never supported using Hyper-V PowerShell on one version of Windows to manage a different version of Hyper-V on a remote computer.  For many scenarios this has "just worked" - but it has not been something that we actively supported and verified.  At the same time - we have been hearing feedback that people want this scenario to work.  To enable this in Windows 10 - we have started versioning our PowerShell module to provide cross version compatibility.  If you need to remotely manage a Windows 8.1 / Windows Server 2012 R2 instance of Hyper-V - you should load the v1.1 Hyper-V PowerShell module.  If you are remotely (or locally) managing Windows 10 / Windows Server 2016 - you should use the v2.0 PowerShell module.

By default, the v2.0 module will get loaded if you just run a Hyper-V Cmdlet - but you can easily remove and import the right module for the system that you want to manage.

Cheers,
Ben

Comments

  • Anonymous
    November 16, 2015
    Yes and with this script you can see, what's the difference between the two versions, just open a new Powershell prompt and insert: Import-Module Hyper-V -RequiredVersion 1.1 $cV1 = Get-Command -Module Hyper-V PS> Remove-Module Hyper-V Import-Module Hyper-V -RequiredVersion 2.0.0.0 $cV2 = Get-Command -Module Hyper-V compare $cv1 $cv2 Got it from: newyear2006.wordpress.com/.../umgang-mit-verschiedenen-versionen-von-powershellmodulen-und-ermittlung-von-unterschieden

  • Anonymous
    November 16, 2015
    Very handy! Thanks!

  • Anonymous
    December 08, 2015
    Hey Ben- where's Live Migration in Windows 10? It's MIA!

  • Anonymous
    May 14, 2017
    When I try to use the 1.1 version for managing a Hyper-V 2012 R2 server I get this. Anyone ever see this?Import-Module -name Hyper-V -RequiredVersion 1.1Import-Module : The following error occurred while loading the extended type data file: Error in TypeData "Microsoft.HyperV.PowerShell.VMReplicationServer": The member AllowAnyServer is already present.

    • Anonymous
      May 26, 2017
      do you see the require module when you do get-module -name hyper-v -listavailable? Are you on Windows 10/2016 with Hyper-V powershell tools installed?