PSScriptAnalyzer Activation

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 7 years and 11 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.
User avatar
smokingjoe
Posts: 22
Last visit: Mon Aug 22, 2022 10:44 am

PSScriptAnalyzer Activation

Post by smokingjoe »

Powershell Studio 2016
Version 5.2.118

Running on Windows 8.1x64

I am trying to activate the psscriptanalyzer. However after running the following two commands and restarting powershell studio I see the tool is not activated.

New at some of the Powershell Studio more advanced features so apologize for being so green; just want to maximize my use of the product.

Install-PackageProvider -Name NuGet -Force
Install-Module -Name PSScriptAnalyzer -RequiredVersion 1.4.0 -scope allusers -force
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: PSScriptAnalyzer Activation

Post by Alexander Riedel »

The tool driving PSScriptAnalyzer looks for the module in a folder called "\WindowsPowerShell\Modules\PSScriptAnalyzer"
under the Program Files folder or under your My Documents folder.
"Program Files" seems to be the default location.

If installed in any other location, it will not find it.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
smokingjoe
Posts: 22
Last visit: Mon Aug 22, 2022 10:44 am

Re: PSScriptAnalyzer Activation

Post by smokingjoe »

I found it in C:\Program Files\WindowsPowerShell\Modules\PSScriptAnalyzer

and it is not being picked up.

I will try it out outside of Powershell studio for now I guess. Thanks for the help.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: PSScriptAnalyzer Activation

Post by davidc »

Please refresh your cache in PowerShell Studio:
Rebuild Cache.png
Rebuild Cache.png (16.64 KiB) Viewed 3791 times
Once the application finds the module in the cache it will enable the tool.

David
David
SAPIEN Technologies, Inc.
User avatar
smokingjoe
Posts: 22
Last visit: Mon Aug 22, 2022 10:44 am

Re: PSScriptAnalyzer Activation

Post by smokingjoe »

Guess I just messed up the two commands because I have refreshed the cache and restarted powershell studio several times but no luck.

Oh well, other stuff takes precedence right now.

I will try to update this post if I find the issue and solution.
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: PSScriptAnalyzer Activation

Post by Alexander Riedel »

Please tell us in what location PSScriptAnalyzer is installed on your computer. We have made changes for its detection for the next service build.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 7 years and 11 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.