Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

When import modules from NeverClobberList, each call of the Import-WinModule adds '.WinModule' to the module name. #64

Open
sethvs opened this issue Dec 11, 2018 · 0 comments

Comments

@sethvs
Copy link
Contributor

sethvs commented Dec 11, 2018

When we call, for example

Import-WinModule Microsoft.PowerShell.Management

there will be Microsoft.PowerShell.Management.WinModule module

Get-Module Microsoft.PowerShell.Management*

ModuleType Version Name                                      ExportedCommands
---------- ------- ----                                      ----------------
Manifest   6.1.0.0 Microsoft.PowerShell.Management           {Add-Content, Clear-Content, Clear-Item, Clear-ItemProperty...}
Script     1.0     Microsoft.PowerShell.Management.WinModule {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Content...}

but if we call Import-WinModule Microsoft.PowerShell.Management again, the Microsoft.PowerShell.Management.WinModule will be renamed to Microsoft.PowerShell.Management.WinModule.WinModule

Import-WinModule Microsoft.PowerShell.Management
Get-Module Microsoft.PowerShell.Management*

ModuleType Version Name                                                ExportedCommands
---------- ------- ----                                                ----------------
Manifest   6.1.0.0 Microsoft.PowerShell.Management                     {Add-Content, Clear-Content, Clear-Item, Clear-ItemProperty...}
Script     1.0     Microsoft.PowerShell.Management.WinModule.WinModule {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Content...}

and so on.

So now, each execution of the Import-WinModule adds .WinModule to the name of the imported module.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant