Issue after PowerShell Studio 5.6.158 update

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 5 years and 1 month 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.
User avatar
cdouglas_nch
Posts: 16
Last visit: Wed Feb 28, 2024 10:55 am

Issue after PowerShell Studio 5.6.158 update

Post by cdouglas_nch »

Since installing the PowerShell Studio 5.6.158 update this morning on my Windows 10 1803 x64 system I'm finding many functions/Cmdlets referenced in scripts not being "detected" (the text is grey instead of blue, and auto-complete in regards to parameters doesn't work). This includes Cmdlets from the builtin ActiveDirectory module as well as functions from my own script modules. I first noticed this happening after I updated a script module under the WindowsPowerShell\Modules folder in my 'My Documents' folder and clicking the 'Refresh Local Cache' button in the Home ribbon in PowerShell Studio. Prior to doing that I didn't notice anything not being detected.

I found that in the PowerShell Cache Editor the Modules that I'm having issues with are present (with the exception that my most recently updated script module was showing the wrong version and the latest version had to be imported), but not checked. I've tried checking the modules and clicking 'Build Cache', following by 'Close', but the functions/Cmdlets are still not detected. If I go back into the PowerShell Cache Editor the module are still checked. Closing/Re-opening PowerShell Studio after checking the modules and clicking 'Build Cache' does seem to result in the functions/Cmdlets being detected.

In previous versions of PowerShell Studio Cmdlets in modules from RSAT (like Get-ADUser) would always automatically be detected, and script modules I placed in my 'My Documents' folder would also automatically be detected, and if I updated them I could click the 'Refresh Local Cache' button and within a minute the new script module would be imported, without having to close/relaunch PowerShell Studio. Has the functionality around all this been changed in this new version, or is something just not working as it's supposed to?

Thanks,
Cody
User avatar
brittneyr
Site Admin
Posts: 1654
Last visit: Wed Mar 27, 2024 1:54 pm
Answers: 39
Been upvoted: 30 times

Re: Issue after PowerShell Studio 5.6.158 update

Post by brittneyr »

[Moved to correct forum by moderator]
Brittney
SAPIEN Technologies, Inc.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Issue after PowerShell Studio 5.6.158 update

Post by davidc »

Hello Cody,

We apologize for any convenience and we try to get to the bottom of this.

- What build of PowerShell Studio did you have installed before updating?

Usually when cmdlets are not colored, it is because the cache is still updating or because the process fails at some point.

Please try the following steps:

1. Make a backup of your Local Machine cache:
1a. Go to the following directory:
C:\Users\(username)\AppData\Roaming\SAPIEN\CachedData 2.1
2b. Make a backup copy of the Local Machine folder, so you don't lose your manual changes.

2. Open PowerShell Studio and refresh the cache.

3. Wait for the process to finish.

4. Zip and upload the Local Machine folder contents here:

https://sapien.com/support/upload

5. Check if the cmdlets are still missing. If so, feel free to restore the backup. You will have to restart PowerShell Studio to see the changes.

Once we have the files, we can investigate further.
David
SAPIEN Technologies, Inc.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Issue after PowerShell Studio 5.6.158 update

Post by davidc »

And if you can, please include a text file with the list of modules:

Code: Select all

Get-Module -ListAvailable
David
SAPIEN Technologies, Inc.
User avatar
cdouglas_nch
Posts: 16
Last visit: Wed Feb 28, 2024 10:55 am

Re: Issue after PowerShell Studio 5.6.158 update

Post by cdouglas_nch »

I've uploaded the requested information.
User avatar
cdouglas_nch
Posts: 16
Last visit: Wed Feb 28, 2024 10:55 am

Re: Issue after PowerShell Studio 5.6.158 update

Post by cdouglas_nch »

Upon doing some of my own troubleshooting while watching the log files in the 'Local Machine' folder, it seems that there's a problem when it goes to process script modules in my 'My Documents\WindowsPowerShell\Modules' folder.

If I remove all the script modules, leaving the 'Modules' folder empty, I can refresh the cache and have all the RSAT Cmdlets available to me.

If I place just a single script module into the 'Modules' folder, the 'ModuleV5_32bit.log' file only indicates a handful of items processed rather than a bunch that it had listed when the folder was empty.

I forgot to include previously that I upgraded to 5.6.158 from 5.6.157.
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: Issue after PowerShell Studio 5.6.158 update

Post by Alexander Riedel »

What module do you put there that would cause that? Can you give us exactly what module and version that would be?
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
cdouglas_nch
Posts: 16
Last visit: Wed Feb 28, 2024 10:55 am

Re: Issue after PowerShell Studio 5.6.158 update

Post by cdouglas_nch »

I've uploaded an example script module that results in the issue occurring, and the 'Local Machine' folder for when PowerShell Studio attempts to refresh the cache while that example script module is in place.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Issue after PowerShell Studio 5.6.158 update

Post by davidc »

We reproduced the issue and it should be resolved in the next service release. We will try to get the build out ASAP.
David
SAPIEN Technologies, Inc.
User avatar
cdouglas_nch
Posts: 16
Last visit: Wed Feb 28, 2024 10:55 am

Re: Issue after PowerShell Studio 5.6.158 update

Post by cdouglas_nch »

Thanks!
This topic is 5 years and 1 month 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.