Page 1 of 2

Issue after PowerShell Studio 5.6.158 update

Posted: Fri Feb 08, 2019 9:24 am
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

Re: Issue after PowerShell Studio 5.6.158 update

Posted: Fri Feb 08, 2019 9:29 am
by brittneyr
[Moved to correct forum by moderator]

Re: Issue after PowerShell Studio 5.6.158 update

Posted: Fri Feb 08, 2019 9:56 am
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.

Re: Issue after PowerShell Studio 5.6.158 update

Posted: Fri Feb 08, 2019 10:11 am
by davidc
And if you can, please include a text file with the list of modules:

Code: Select all

Get-Module -ListAvailable

Re: Issue after PowerShell Studio 5.6.158 update

Posted: Fri Feb 08, 2019 11:14 am
by cdouglas_nch
I've uploaded the requested information.

Re: Issue after PowerShell Studio 5.6.158 update

Posted: Fri Feb 08, 2019 11:44 am
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.

Re: Issue after PowerShell Studio 5.6.158 update

Posted: Fri Feb 08, 2019 11:49 am
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?

Re: Issue after PowerShell Studio 5.6.158 update

Posted: Fri Feb 08, 2019 12:16 pm
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.

Re: Issue after PowerShell Studio 5.6.158 update

Posted: Mon Feb 11, 2019 11:26 am
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.

Re: Issue after PowerShell Studio 5.6.158 update

Posted: Mon Feb 11, 2019 12:40 pm
by cdouglas_nch
Thanks!