Page 1 of 1

Module project PrimalSense from RequiredModules

Posted: Tue Sep 25, 2018 12:32 pm
by claussen
Product, version and build: PSS 2018 5.5.154
32 or 64 bit version of product: 64
Operating system: Windows 10 Enterprise
32 or 64 bit OS: 64

I have a module project which has a list of modules in the "RequiredModules" key in the PSD1. However, each function does not recognize the cmdlets/functions from the modules and inserts an "Import-Module" command when I use one.

See the PSD defintion:
2018-09-25_15-22-08-psd.png
2018-09-25_15-22-08-psd.png (13.45 KiB) Viewed 3578 times
And the function I am writing... There is no PrimalSense for the ActiveDirectory module
2018-09-25_15-22-42-function.png
2018-09-25_15-22-42-function.png (22.46 KiB) Viewed 3578 times

Of course, if I use the "Import-Module ActiveDirectory" somewhere in the function file, PrimalSense works properly. Are there any plans for PSS to recognize modules from the PSD and provide PrimalSense project wide?

Thanks!

Re: Module project PrimalSense from RequiredModules

Posted: Tue Sep 25, 2018 1:18 pm
by mxtrinidad
Is your custom module already visible on the Object Browser before creating the script?

Re: Module project PrimalSense from RequiredModules

Posted: Tue Sep 25, 2018 1:26 pm
by claussen
ActiveDirectory is not a custom module... But yes, ActiveDirectory is visible in the Object Browser. The module I am building is not exported to the system module path so it does not appear in the OBject Browser. I am trying to use the ActiveDirectory module in my custom module, but PSS does not appear to perform PrimalSense from RequiredModules defined in the project's PSD1 file.
2018-09-25_16-23-17-module.png
2018-09-25_16-23-17-module.png (10.05 KiB) Viewed 3569 times

Re: Module project PrimalSense from RequiredModules

Posted: Tue Sep 25, 2018 1:27 pm
by davidc
Hello,

What setting do you have for the following?

Options->PrimalSense->Cmdlet PrimalSense
Options - Cmdlet PrimalSense.png
Options - Cmdlet PrimalSense.png (30.46 KiB) Viewed 3568 times
By setting it to Show and Color All Cmdlets, it will ensure the cmdlets are always colored.

Re: Module project PrimalSense from RequiredModules

Posted: Tue Sep 25, 2018 2:02 pm
by claussen
That was it! Mine was set to "Show All Cmdlets (PrimalSense only)." Changing to Show all fixed it. Thanks!

Re: Module project PrimalSense from RequiredModules

Posted: Tue Sep 25, 2018 2:04 pm
by mxtrinidad
Good!! I was referring to your custom ...PS.psd1 module file.
Glad you found the resolution.

Re: Module project PrimalSense from RequiredModules

Posted: Tue Sep 25, 2018 3:06 pm
by davidc
We will look into pulling the module information from the manifest manifest when your PrimalSense setting is set to Active Modules Only.

Re: Module project PrimalSense from RequiredModules

Posted: Tue Oct 09, 2018 9:03 am
by davidc
The build with the fix has been released (v5.5.155).