-
Notifications
You must be signed in to change notification settings - Fork 404
Added user-friendly installation instructions #2141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -66,7 +66,12 @@ documentation for the latest release is published on on learn.microsoft.com. | |||||
| ## Installation | ||||||
|
|
||||||
| To install **PSScriptAnalyzer** from the PowerShell Gallery, see | ||||||
| [Installing PSScriptAnalyzer](https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/overview#installing-psscriptanalyzer). | ||||||
| [Installing PSScriptAnalyzer](https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/overview#installing-psscriptanalyzer) or simply open PowerShell in a Terminal and run: | ||||||
|
|
||||||
| ```powershell | ||||||
| Set-PSRepository -Name PSGallery -InstallationPolicy Trusted | ||||||
| Install-Module -Name PSScriptAnalyzer | ||||||
|
||||||
| Install-Module -Name PSScriptAnalyzer | |
| Install-Module -Name PSScriptAnalyzer -Scope CurrentUser |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting the PSGallery repository to "Trusted" globally is a security risk and should not be recommended in installation instructions. This bypasses PowerShell's security prompts for package installations from PSGallery.
Instead, either:
Set-PSRepositoryline entirely and let users respond to the interactive prompt when runningInstall-Module, or-Forceparameter withInstall-Moduleto bypass the prompt for this specific installation only: