SxS modules

Welcome Forums General PowerShell Q&A SxS modules

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

 
Participant
2 years, 6 months ago.

  • Author
    Posts
  • #38378

    Participant
    Points: 21
    Rank: Member

    Hi Folks,

    I've installed two versions of a module like below.

        Directory: C:\Program Files\WindowsPowerShell\Modules
    
    ModuleType Version    Name                                ExportedCommands
    ---------- -------    ----                                ----------------
    Binary     2.4.0.44   ISESteroids                         {Add-SteroidsContextMenuCommand, Add-SteroidsEditorTabComm...
    Binary     2.3.0.64   ISESteroids                         {Add-SteroidsContextMenuCommand, Add-SteroidsEditorTabComm...
    
    

    Is it safe to assume the newest version of the Cmdlet will always run?

    PS Library:\> gcm -Module isesteroids
    
    CommandType     Name                                               Version    Source
    -----------     ----                                               -------    ------
    Cmdlet          Add-SteroidsContextMenuCommand                     2.4.0.44   ISESteroids
    Cmdlet          Add-SteroidsEditorTabCommand                       2.4.0.44   ISESteroids
    Cmdlet          Add-SteroidsLicense                                2.4.0.44   ISESteroids
    Cmdlet          Add-SteroidsTextChange                             2.4.0.44   ISESteroids
    Cmdlet          Add-SteroidsTool                                   2.4.0.44   ISESteroids
    

    Thanks,

    Michael

  • #38384

    Participant
    Points: 0
    Rank: Member

    it is not safe to assume that the newest version will always run. June Blender has a great presentation covering version chaos. The powerpoint and scripts are in github https://github.com/juneb/AvoidVersionChaos

  • #38388

    Participant
    Points: 21
    Rank: Member

    Thanks Jonathan, I was not at the conference but follow June on Twitter. I did flick through these when June put them up but forgot about them since.

    I reviewed the slides again and like you said you get the first version of the module discovered that meets the specification.

    So some of the suggestions . . .

    * Use the -version parameter with Import-Module

    * Remove-Module when no longer needed

    * Use the module qualified name, for example: PSCX\Expand-Archive

The topic ‘SxS modules’ is closed to new replies.