PSScriptAnalyzer Activation

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
smokingjoe
Posts: 13
Joined: Wed Jul 22, 2015 4:20 am

PSScriptAnalyzer Activation

Post by smokingjoe » Wed Mar 30, 2016 6:43 pm

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

Re: PSScriptAnalyzer Activation

Post by Alexander Riedel » Wed Mar 30, 2016 7:39 pm

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: 13
Joined: Wed Jul 22, 2015 4:20 am

Re: PSScriptAnalyzer Activation

Post by smokingjoe » Thu Mar 31, 2016 4:13 am

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

Re: PSScriptAnalyzer Activation

Post by davidc » Thu Mar 31, 2016 7:51 am

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

David
David
SAPIEN Technologies, Inc.

User avatar
smokingjoe
Posts: 13
Joined: Wed Jul 22, 2015 4:20 am

Re: PSScriptAnalyzer Activation

Post by smokingjoe » Fri Apr 01, 2016 4:59 am

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

Re: PSScriptAnalyzer Activation

Post by Alexander Riedel » Fri Apr 01, 2016 9:31 am

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.