PSScriptAnalyzer

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 10 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
DAMACSB
Posts: 17
Last visit: Mon Jul 03, 2017 12:53 pm

PSScriptAnalyzer

Post by DAMACSB »

Product, version and build: Sapien Suite 2016, Primal Script - version: 7.6.84
32 or 64 bit version of product: 32bit
Operating system: Windows 7 Pro
32 or 64 bit OS: 32 bit, virtualized on Oracle's VirtualBox

Error: PSScriptAnalyzer is not installed in its default location0 error(s), 0 warning(s)
DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: PSScriptAnalyzer

Post by Alexander Riedel »

Install the PSScriptAnalyzer module in one of the two default locations:
Under "Program Files" or under "My Documents\Windows PowerShell"
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
DAMACSB
Posts: 17
Last visit: Mon Jul 03, 2017 12:53 pm

Re: PSScriptAnalyzer

Post by DAMACSB »

Ok. I'm in left field here. Where do I get the module?
User avatar
juneblender
Posts: 93
Last visit: Thu Mar 30, 2017 8:54 am

Re: PSScriptAnalyzer

Post by juneblender »

The PSScriptAnalyzer module is available on the PowerShell Gallery. You can get it on GitHub, too (https://github.com/PowerShell/PSScriptAnalyzer), but I would stick with the released version. To get modules from the PowerShell Gallery, you need the PowerShellGet module.

Here's the installation sequence:

1. Install the PackageManagement and PowerShellGet modules from the Microsoft Download Center: https://www.microsoft.com/en-us/downloa ... x?id=49186

2. Use the Install-Module cmdlet to install the PSScriptAnalyzer module. I prefer to install the modules in $home\Documents\WindowsPowerShell\Modules, because you can install/uninstall without admin privileges, but your environment might dictate that choice.

Install-Module PSScriptAnalyzer -Scope CurrentUser

If you prefer to examine the module before installing it, you can use the Save-Module cmdlet to save it to a location that is not in the $env:PSModulePath list.

Let us know if you need any other help.
User avatar
DAMACSB
Posts: 17
Last visit: Mon Jul 03, 2017 12:53 pm

Re: PSScriptAnalyzer

Post by DAMACSB »

Thanks. Got it.
This topic is 7 years and 10 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.