I know I can limit exported commands from module that is imported like this:
Import-Module C:...MyModule
or Import-Module C:...MyModuleMyModule.psd1
Then I can use CmdletsToExport in .psd1.
But, what if I import module from .dll?
Import-Module C:...MyModule.dll
How to limit exported commands (cmdlets)?
There are cmdlets in our .dll that should be “hidden” in default and we want to allow calls of them only if some environment variable has some value.
New contributor
Miroslav Vanický is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.