Skip to content
This repository was archived by the owner on Jun 16, 2021. It is now read-only.
This repository was 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

Description

@sethvs

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions