My Technical Notes

Friday, 6 March 2015

PowerShell: Modules are auto-loaded by default

To stop modules from being auto-loaded by default, we add the following code to our `$profile`:


$PSModuleAutoLoadingPreference = 'None'

On another note, if a module contains no `Export-ModuleMember` statements, then all functions defined inside it will be imported.

No comments: