The same module is different housing. What for?

The problem with the minicub and docker machine in Windows occurs if you determine if the hyper-v module is available. For more information:

but it is not essential.

What is it that on two Windows 10 machines, both modern and WMF 5.1 (PSVersion 5.1.16299.251) At startup, Get-Command hyper-v\get-vmwe get different results.

Let me demonstrate:

enter image description here

enter image description here

The difference is that the module name is different. This is "hyper-v" versus "hyper-v". I compared byte files inside C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Hyper-V. They are the same, and the path name has the same corpus.

So why is the difference?

+4
source share
1

, , :

Import-Module Hyper-v
(Get-Command hyper-v\get-vm).Module.Name

Hyper-v.

enter image description here

:

@(Get-Module -ListAvailable hyper-v).Name | Get-Unique

, PowerShell Build Windows.

PowerShell 6.0.0 hyper-v module : PowerShell 5.1 hyper-v module : Sometimes it is visible

. , Get-Module -ListAvailable. , Windows ? , Windows 10, . ( ).

+3

Source: https://habr.com/ru/post/1696042/


All Articles