PS Modules not enabled/loading...

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 2 years and 10 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.
jpascucci84
Posts: 5
Last visit: Thu Feb 08, 2024 12:41 pm

PS Modules not enabled/loading...

Post by jpascucci84 »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: 5.8.188.0
Operating system: Windows 10 2009 (20H2)
PowerShell version(s): v5

*** Please add details and screenshots as needed below. ***

When I type a cmdlet like, get-hpbiosupdates the cmdlet is not found. How do I enable these modules?

DO NOT POST LICENSES, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
Attachments
Untitled.png
Untitled.png (28.88 KiB) Viewed 7698 times
User avatar
brittneyr
Site Admin
Posts: 1654
Last visit: Wed Mar 27, 2024 1:54 pm
Answers: 39
Been upvoted: 30 times

Re: PS Modules not enabled/loading...

Post by brittneyr »

When you are scripting, make sure to import the module you are using in the script:
  1. Import-Module ModuleName
This will add the module to the session when your script is running.

Verify that module that contains your command is listed.
If it is not listed, rebuild build the cache:
SPS_RibbonRebuildCache.png
SPS_RibbonRebuildCache.png (23.88 KiB) Viewed 7687 times
This will could take a few minutes depending on the number of modules installed on your machine.

Afterwards, the application will need to restarted or the cache will need to be reloaded:
SPS_RibbonReloadCache.png
SPS_RibbonReloadCache.png (20.95 KiB) Viewed 7687 times
Brittney
SAPIEN Technologies, Inc.
jpascucci84
Posts: 5
Last visit: Thu Feb 08, 2024 12:41 pm

Re: PS Modules not enabled/loading...

Post by jpascucci84 »

Thank you for the reply. I've tried these steps and still have the same issue.

In PS ISE these load with no issue but in PS Studio they do not but they used to so I'm not sure what happened. I've uninstalled and reinstall and even tried installing PS Studio on a new machine with the same issue.
Attachments
2.png
2.png (18.45 KiB) Viewed 7664 times
1.png
1.png (52.64 KiB) Viewed 7664 times
User avatar
brittneyr
Site Admin
Posts: 1654
Last visit: Wed Mar 27, 2024 1:54 pm
Answers: 39
Been upvoted: 30 times

Re: PS Modules not enabled/loading...

Post by brittneyr »

If you expand the module(s) from the Object Browser pane, do you see the commands listed:
SPS_ObjectBrowser-Commands.png
SPS_ObjectBrowser-Commands.png (24.54 KiB) Viewed 7643 times
Do your scripts with these commands run in PowerShell Studio?
Brittney
SAPIEN Technologies, Inc.
jpascucci84
Posts: 5
Last visit: Thu Feb 08, 2024 12:41 pm

Re: PS Modules not enabled/loading...

Post by jpascucci84 »

No, it doesn't show anything under the modules if I try to expand next to each of them.

Yes, the command still runs although its grey.
Attachments
Untitled.png
Untitled.png (121.18 KiB) Viewed 7593 times
User avatar
brittneyr
Site Admin
Posts: 1654
Last visit: Wed Mar 27, 2024 1:54 pm
Answers: 39
Been upvoted: 30 times

Re: PS Modules not enabled/loading...

Post by brittneyr »

Can you please go to C:\ProgramData\SAPIEN\PresetCache 2.1\ModuleCacheV5, zip the folder and upload it here so we can have a look:
https://www.sapien.com/support/upload

Please open the cache editor and remove all modules that are suppose to have commands listed, but do not. This will delete the existing cache information of those modules.
Then close the cache editor and rebuild the cache again. Again, this will take a few minutes.
After it is finished, reload the cache or restart the application and check if the commands are now listed.
Brittney
SAPIEN Technologies, Inc.
jpascucci84
Posts: 5
Last visit: Thu Feb 08, 2024 12:41 pm

Re: PS Modules not enabled/loading...

Post by jpascucci84 »

The file has been uploaded.

Unchecked the modules that are not working and reloaded, still the same issue.
User avatar
brittneyr
Site Admin
Posts: 1654
Last visit: Wed Mar 27, 2024 1:54 pm
Answers: 39
Been upvoted: 30 times

Re: PS Modules not enabled/loading...

Post by brittneyr »

Unchecking the module is not the same as removing them as unchecking them does not remove the cache files associated with the module.

Please open the cache editor, select the module (the specific version that you are working with) not working, then 'Remove Module':
SPS_CacheEditor-RemoveModule.png
SPS_CacheEditor-RemoveModule.png (40.37 KiB) Viewed 7332 times
Remove all modules not working in the editor.

Close the cache editor, then rebuild the cache:
SPS_RibbonRebuildCache.png
SPS_RibbonRebuildCache.png (23.88 KiB) Viewed 7332 times
A message will appear in the Tools Output pane when the process starts and when the process ends. Please wait for the process to finish.


Lastly, reload the cache into the application:
SPS_RibbonReloadCache.png
SPS_RibbonReloadCache.png (20.95 KiB) Viewed 7332 times
Brittney
SAPIEN Technologies, Inc.
jpascucci84
Posts: 5
Last visit: Thu Feb 08, 2024 12:41 pm

Re: PS Modules not enabled/loading...

Post by jpascucci84 »

That did the trick, thank you very much!
This topic is 2 years and 10 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.