You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bundled Modules should be installed in \Name\Version\ folders in PSCore #2350
Install v6.0.0.10 for Windows10
Open C:\Program Files\PowerShell\6.0.0.10\Modules and check the folder for the bundled module like PSReadLine
Expected behavior
There should be a folder relating to the version of the Module installed and the module files should be in that location i.e. C:\Program Files\PowerShell\6.0.0.10\Modules\PSReadLine\1.2\
Actual behavior
Module files are stored in the module name folder with no version folder i.e. C:\Program Files\PowerShell\6.0.0.10\Modules\PSReadLine\
Environment data
Name Value
---------
PSEdition Core
PSCompatibleVersions {1.0,2.0,3.0,4.0...}
PSVersion 6.0.0-alpha
SerializationVersion 1.1.0.1
PSRemotingProtocolVersion 2.3
WSManStackVersion 3.0
GitCommitId v6.0.0-alpha.10-dirty
BuildVersion 3.0.0.0
CLRVersion
Sorry for the inaccuracy. I mean, can the cmdlet do this for directory structure like "/PowerShell/<PowerShell version>/Modules/<Module name>/<Module version>/" ?
Ilya (@iSazonov): yes, we look in any folder in PSModulePath for module folders, and in those module folders we look for version folders. In the absence of a version folder, we load the module from there.
For context, this is in the PSModulePath in 6.0.0-beta.1:
Joey Aiello (@joeyaiello) - It just shows a level of inconsistency & it could easily cause confusion to those not that overly familiar. It also allows in future for the potential for all modules bundled with the engine to be unbundled as per #1979
Also as versioned modules support was brought in v5 it really doesn't make sense for there to be this inconsistency in a v6 product especially as you are moving to a more decoupled nature the further that the development goes on and on.
Until the module is decoupled from PSCore itself, there's no value to have it in a versioned folder since it's not updatable outside of updating PSCore itself. The ones that have versioned folders are those obtained from PSGallery.
Currently we removed all external modules from the repo and as Steve Lee (@SteveL-MSFT) said all standard modules is installed without version folder to support servicing by WU.
So I close the Issue.
Activity
SteveL-MSFT commentedon Nov 4, 2016
This appears to affect all modules
kilasuit commentedon Dec 1, 2016
This seems to still affect the modules below that are built along with PowerShell from what I can tell in the 6.0.0.13 release
CimCmdlets
Microsoft.PowerShell.Archive
Microsoft.PowerShell.Diagnostics
Microsoft.PowerShell.Host
Microsoft.PowerShell.LocalAccounts
Microsoft.PowerShell.Management
Microsoft.PowerShell.Security
Microsoft.PowerShell.Utility
Microsoft.WSMan.Management
Pester
PSDesiredStateConfiguration
PSDiagnostics
PSReadLine
joeyaiello commentedon May 25, 2017
Still relevant, but not critical for 6.0.0.
kilasuit commentedon May 27, 2017
Joey Aiello (@joeyaiello) - although not critical it is IMO detrimental for being able to ship any of these in packaged versions as separate packages
iSazonov commentedon May 28, 2017
I believe it requires an enhancement in Import-Module to load last version, required version or explicit version too, doesn't it?
SteveL-MSFT commentedon May 28, 2017
Ilya (@iSazonov)
import-modulealready understands module versioning, this should only require putting the module files under a version folderiSazonov commentedon May 29, 2017
Sorry for the inaccuracy. I mean, can the cmdlet do this for directory structure like "/PowerShell/<PowerShell version>/Modules/<Module name>/<Module version>/" ?
SteveL-MSFT commentedon May 29, 2017
Should be $PSHome/Modules/<ModuleName>/<ModuleVersion>
joeyaiello commentedon May 30, 2017
Ilya (@iSazonov): yes, we look in any folder in PSModulePath for module folders, and in those module folders we look for version folders. In the absence of a version folder, we load the module from there.
For context, this is in the PSModulePath in 6.0.0-beta.1:
Ryan Yates (@kilasuit) could you elaborate? I don't fully understand the scenario you're describing.
kilasuit commentedon Jun 2, 2017
Joey Aiello (@joeyaiello) - It just shows a level of inconsistency & it could easily cause confusion to those not that overly familiar. It also allows in future for the potential for all modules bundled with the engine to be unbundled as per #1979
Also as versioned modules support was brought in v5 it really doesn't make sense for there to be this inconsistency in a v6 product especially as you are moving to a more decoupled nature the further that the development goes on and on.
kilasuit commentedon Jun 14, 2018
This is still relevant in 6.1.0-preview.3 as seen below for a number of the packaged modules like
This is how it looks in the directory
each of these modules should be in their version specific folder for neatness
SteveL-MSFT commentedon Jun 15, 2018
Until the module is decoupled from PSCore itself, there's no value to have it in a versioned folder since it's not updatable outside of updating PSCore itself. The ones that have versioned folders are those obtained from PSGallery.
iSazonov commentedon Aug 29, 2018
Currently we removed all external modules from the repo and as Steve Lee (@SteveL-MSFT) said all standard modules is installed without version folder to support servicing by WU.
So I close the Issue.
o-l-a-v commentedon Jun 23, 2026
This should not be closed. Making WU able to update modules might be implemented, but it partially broke import.