PowerShell / JEA

Just Enough Administration
http://aka.ms/JEAdocs
MIT License
257 stars 60 forks source link

JEA roles can't find modules in version folders #18

Closed joeyaiello closed 6 years ago

joeyaiello commented 7 years ago

Got this one from a customer at PS Summit NA 2017:

If you use Install-Module to install a module, it gets placed in a folder that looks like $env:PSModulePath\ModuleName\Version. Apparently, when you try to join a session with a given JEA role, the session cannot find its allowed modules unless you move the module up out of the version folder (so from, e.g. 1.0.1.0 to ModuleName).

jnury commented 6 years ago

Hello @joeyaiello, Hi opened this bug some time ago: https://github.com/PowerShell/PowerShell/issues/3522 Seems it's fixed in PS 6.

Personally, I create a junction when deploying the module (thru DSC): New-Item -ItemType Junction -Path _ModulePath_\myModule\RoleCapabilities -Target _ModulePath_\myModule\1.0.1.0\RoleCapabilities

rpsqrd commented 6 years ago

Going to close this issue in response to the above and the JEA-specific issue that tracks this: PowerShell/PowerShell#4104