Import Module to Dashboard Only

Product: PowerShell Universal
Version: 3.7.10

So, i have a module in my dashboards/mydash folder, i want to import that module only for that dashboard and have intelisense in the editor work. Is there a way to do this?

From my understanding, if you put something in the modules’ folder, it loads on boot.

What you can do is store the module file or folder in some other location, then do an import-module in your script.

Import-Module "$PathToScript\Module.psm1"

i did that, but the import does not cause the editor to know about the cmdlets. thus intelisense is broke

We are doing little to discover other modules outside PSModulePath for the IntelliSense.We just have a simple runspace pool that manages this. I think we’d need to enhance this functionality some how to provide this type of support.

1 Like