Skip to content
This repository has been archived by the owner on Feb 4, 2019. It is now read-only.

How modules are loaded? #387

Open
ArsenShnurkov opened this issue Jun 22, 2015 · 1 comment
Open

How modules are loaded? #387

ArsenShnurkov opened this issue Jun 22, 2015 · 1 comment
Labels

Comments

@ArsenShnurkov
Copy link

There are several existing modules, which resides in the same folder as Pash.exe. It is not documented, how they are loaded.

If I will place my module there - will it be loaded without additional commands?
No. They are "explicitly loaded" - #382 (comment)

Is there any config which specifies/restricts list of modules to load?
If there is such config - where it is located, and where it's format is documented?

I added my proposition about modules locations to #332 (comment)

@sburnicki
Copy link
Member

Currently the three default modules (Microsoft.PowerShell.Commands.Management.dll,
Microsoft.PowerShell.Commands.Utility.dll, Microsoft.PowerShell.Security.dll) are hard-coded to be loaded at startup. Other DLLs in this directory are not Powershell modules.
Therefore no other DLLs are loaded "by chance" to see what's in there.

Yes, this should be configurable, but no it's not yet. The way to go is to implement PSModulePath (#332) and then implement proper auto-loading.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants