Added user-friendly installation instructions#2141
Added user-friendly installation instructions#2141admercs wants to merge 3 commits intoPowerShell:mainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds inline PowerShell commands to the README.md file to provide users with a quick installation method for PSScriptAnalyzer directly from the documentation, complementing the existing link to the detailed installation guide.
- Added inline PowerShell code snippet for installing PSScriptAnalyzer from PowerShell Gallery
- Provided command to set PSGallery as a trusted repository before installation
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ```powershell | ||
| Set-PSRepository -Name PSGallery -InstallationPolicy Trusted | ||
| Install-Module -Name PSScriptAnalyzer |
There was a problem hiding this comment.
The -Scope parameter should be specified for Install-Module to clarify where the module will be installed. Without it, PowerShell will attempt to install to AllUsers scope which requires elevated permissions, potentially causing the command to fail for non-admin users.
Consider updating to:
Install-Module -Name PSScriptAnalyzer -Scope CurrentUserThis allows users to install the module without requiring administrator privileges.
| Install-Module -Name PSScriptAnalyzer | |
| Install-Module -Name PSScriptAnalyzer -Scope CurrentUser |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
PR Summary
PR Checklist
.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.