Custom Powershell Modules Shared value not saving

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION 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.
This topic is 1 year and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
jimbo1972
Posts: 3
Last visit: Fri Jan 20, 2023 12:29 pm

Custom Powershell Modules Shared value not saving

Post by jimbo1972 »

Product: PowerShell Studio 2022 (64 Bit)
Build: v5.8.213
OS: Windows 11 (64Bit)
Build: v22000.1335

Hi, I have a project that has custom modules and as per the advice in this SAPIEN Technologies video called "How to include and deploy a PowerShell Custom Module in a GUI Application" and I have changed the 'Shared' value to True for the module in its properties. This works great until I restart Powershell Studio and then the Share value for all of my custom modules is returned to False. Any idea why this is happening?
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 7:24 am
Answers: 39
Been upvoted: 30 times

Re: Custom Powershell Modules Shared value not saving

Post by brittneyr »

We will look into this and get back to you when our office opens on January 3rd.
Brittney
SAPIEN Technologies, Inc.
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 7:24 am
Answers: 39
Been upvoted: 30 times

Re: Custom Powershell Modules Shared value not saving

Post by brittneyr »

Please try build 5.8.214 and let me know if you are still experiencing this behavior.
Brittney
SAPIEN Technologies, Inc.
jimbo1972
Posts: 3
Last visit: Fri Jan 20, 2023 12:29 pm

Re: Custom Powershell Modules Shared value not saving

Post by jimbo1972 »

I have now installed build 5.8.214.
For testing.
Started a Blank form project. Added a blank form. Made a folder called "WinServer-Status"
Added a file called "WinServer-Status.psm1" inside the folder called "WinServer-Status"
Click on psm1 file and in properties changed Shared from False to TRUE.
Save ALL. Close Powershell Studio. Re-open to the same project.
Shared has now changed to False.
Am I missing something?
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 7:24 am
Answers: 39
Been upvoted: 30 times

Re: Custom Powershell Modules Shared value not saving

Post by brittneyr »

Thank you for the information. I'll look into this and get back to you.
It might have to do with using a module file in a form project rather than in a module project.
Brittney
SAPIEN Technologies, Inc.
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 7:24 am
Answers: 39
Been upvoted: 30 times

Re: Custom Powershell Modules Shared value not saving

Post by brittneyr »

I was able to reproduce this behavior and have filed a bug report for the development team. When I have more information, I'll update you.
Brittney
SAPIEN Technologies, Inc.
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 7:24 am
Answers: 39
Been upvoted: 30 times

Re: Custom Powershell Modules Shared value not saving

Post by brittneyr »

Are you importing your module WinServer-Status in the Globals.ps1 file? If not there, where are you importing it?
Brittney
SAPIEN Technologies, Inc.
This topic is 1 year and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.