I have created a module that requires the sqlps module in order to work. The module I have created is a module manifest. Within the module manifest i have the following line NestedModules = @(‘sqlps’, DatabaseDeployment’, ‘etc’). This loads the sqlps module before loading the DatabaseDeployment module etc. I have a couple of questions.
Is there a way to load the sqlps module with disable name checking enabled but keeping the sqlps module local to my modules scope.
Is there a way of executing code to initialize the environment after the modules have loaded. ScriptsToProcess seems to execute prior to loading the modules. I want to do this to change the PSDrive.
Is there a way to include all of the functions, cmdlets etc for export excluding the sqlps ones. I don’t want to expose sqlps I just want to consume it. Currently i am using FunctionsToExport = ‘*’.
Thanks in advance