New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get-Module -ListAvailable skips module found in PSModulePath #8125
Comments
@rjmholt for comment. |
Looked into the code, and this is because LCID Name DisplayName
---- ---- -----------
44 az Azerbaijani
|
Wow, what's the situation this is intended to avoid? Is there an extra check we can do, like check if the dirname matches the module name? |
@rjmholt looks like an optimization with the assumption that directories named after locales don't contain modules. Perhaps we can just remove that bit of code and see what the perf difference is. |
I'm currently dealing with issues on related to this bug. Regardless of where it is fixed, what would be a viable work around for someone running into this issue. I've searched quite a bit on the web and the threads related to this are right on the nose in terms of problems, but there are no solutions. In my I do not want to specify each What options do I have to specify the required modules? Is there a wild card that I can specify that will separate it from the Maybe even a alias for the Thanks for your help and support. |
@nexocentric After spending much time trying to search the web for a solution to this (as you have) and hitting a brick wall, I finally managed create a workaround to the problem by writing the following cmdlet function:
It may not be the most elegant solution, but it works in 5.x and does what I need it to do. It also handles exact versions or version ranges. |
@CoderByTheBay - Thanks. As you say there are loads of people online with this issue but no fixes. Your solution has worked perfectly. Nice job. 👍 |
Installing the
Az
module from the PowerShell Gallery will install the baseAz
module, as well as all other submodules (e.g.,Az.Compute
,Az.Sql
, etc.) that it requires -- however, this module appears to be skipped when runningGet-Module -ListAvailable
, whereas all of the submodules appear.Steps to reproduce
Expected behavior
Actual behavior
Environment data
The text was updated successfully, but these errors were encountered: