Module project PrimalSense from RequiredModules

Support for all customers who have purchased a SAPIEN PowerShell Studio product license. This forum does not offer a response time guarantee.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
claussen
Posts: 14
Joined: Thu Dec 04, 2014 9:48 am

Module project PrimalSense from RequiredModules

Post by claussen » Tue Sep 25, 2018 12:32 pm

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 1164 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 1164 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!

User avatar
mxtrinidad
Site Admin
Posts: 224
Joined: Sun Mar 03, 2013 12:42 pm

Re: Module project PrimalSense from RequiredModules

Post by mxtrinidad » Tue Sep 25, 2018 1:18 pm

Is your custom module already visible on the Object Browser before creating the script?

User avatar
claussen
Posts: 14
Joined: Thu Dec 04, 2014 9:48 am

Re: Module project PrimalSense from RequiredModules

Post by claussen » Tue Sep 25, 2018 1:26 pm

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 1155 times

User avatar
davidc
Posts: 5474
Joined: Thu Aug 18, 2011 4:56 am

Re: Module project PrimalSense from RequiredModules

Post by davidc » Tue Sep 25, 2018 1:27 pm

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 1154 times
By setting it to Show and Color All Cmdlets, it will ensure the cmdlets are always colored.
David
SAPIEN Technologies, Inc.

User avatar
claussen
Posts: 14
Joined: Thu Dec 04, 2014 9:48 am

Re: Module project PrimalSense from RequiredModules

Post by claussen » Tue Sep 25, 2018 2:02 pm

That was it! Mine was set to "Show All Cmdlets (PrimalSense only)." Changing to Show all fixed it. Thanks!

User avatar
mxtrinidad
Site Admin
Posts: 224
Joined: Sun Mar 03, 2013 12:42 pm

Re: Module project PrimalSense from RequiredModules

Post by mxtrinidad » Tue Sep 25, 2018 2:04 pm

Good!! I was referring to your custom ...PS.psd1 module file.
Glad you found the resolution.

User avatar
davidc
Posts: 5474
Joined: Thu Aug 18, 2011 4:56 am

Re: Module project PrimalSense from RequiredModules

Post by davidc » Tue Sep 25, 2018 3:06 pm

We will look into pulling the module information from the manifest manifest when your PrimalSense setting is set to Active Modules Only.
David
SAPIEN Technologies, Inc.

User avatar
davidc
Posts: 5474
Joined: Thu Aug 18, 2011 4:56 am

Re: Module project PrimalSense from RequiredModules

Post by davidc » Tue Oct 09, 2018 9:03 am

The build with the fix has been released (v5.5.155).
David
SAPIEN Technologies, Inc.