Skip to content
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

Start-RSJob - be able to import private functions #156

Closed
copdips opened this issue Jul 26, 2017 · 0 comments
Closed

Start-RSJob - be able to import private functions #156

copdips opened this issue Jul 26, 2017 · 0 comments
Assignees

Comments

@copdips
Copy link
Contributor

copdips commented Jul 26, 2017

@proxb

Many Powershell modules have the Private folder which contains the functions that the authors don't want to export them to the end users.
That means when an user types "gci function:", he won't see any these private functions after the module import.

It may happen that when an user uses Start-RSJob, inside the script block or the script file, some of the private functions need to be called.
The private functions are not PsModule, nor PsSnapin, nor functions already imported into the user's function:\ space, and nor in the callstack.

Currently, the only choice to achieve it is to import these function files at the beginning of inside the script block/file, but it will be imported as many times as the RSJob number.

It would be nice that these private functions files could be loaded directly and once into $InitialSessionState.

The more files to load, and the more RSJob created, the faster the data will be returned than the one by importing the files inside the script block/file.

@proxb proxb self-assigned this Jul 31, 2017
@proxb proxb closed this as completed in 6131382 Jan 27, 2018
proxb added a commit that referenced this issue Jan 27, 2018
fix #156 - Start-RSJob - be able to import private functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants