Issue after PowerShell Studio 5.6.158 update

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
cdouglas_nch
Posts: 16
Joined: Tue May 10, 2016 10:12 am

Issue after PowerShell Studio 5.6.158 update

Post by cdouglas_nch » Fri Feb 08, 2019 10:24 am

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: 46
Joined: Thu Jun 01, 2017 7:20 am

Re: Issue after PowerShell Studio 5.6.158 update

Post by brittneyr » Fri Feb 08, 2019 10:29 am

[Moved to correct forum by moderator]
Brittney Ryn
SAPIEN Technologies, Inc.

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

Re: Issue after PowerShell Studio 5.6.158 update

Post by davidc » Fri Feb 08, 2019 10:56 am

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: 5801
Joined: Thu Aug 18, 2011 4:56 am

Re: Issue after PowerShell Studio 5.6.158 update

Post by davidc » Fri Feb 08, 2019 11:11 am

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
Joined: Tue May 10, 2016 10:12 am

Re: Issue after PowerShell Studio 5.6.158 update

Post by cdouglas_nch » Fri Feb 08, 2019 12:14 pm

I've uploaded the requested information.

User avatar
cdouglas_nch
Posts: 16
Joined: Tue May 10, 2016 10:12 am

Re: Issue after PowerShell Studio 5.6.158 update

Post by cdouglas_nch » Fri Feb 08, 2019 12:44 pm

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: 6861
Joined: Tue May 29, 2007 4:43 pm

Re: Issue after PowerShell Studio 5.6.158 update

Post by Alexander Riedel » Fri Feb 08, 2019 12:49 pm

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
Joined: Tue May 10, 2016 10:12 am

Re: Issue after PowerShell Studio 5.6.158 update

Post by cdouglas_nch » Fri Feb 08, 2019 1:16 pm

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: 5801
Joined: Thu Aug 18, 2011 4:56 am

Re: Issue after PowerShell Studio 5.6.158 update

Post by davidc » Mon Feb 11, 2019 12:26 pm

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
Joined: Tue May 10, 2016 10:12 am

Re: Issue after PowerShell Studio 5.6.158 update

Post by cdouglas_nch » Mon Feb 11, 2019 1:40 pm

Thanks!