PSScriptAnalyzer for PowerShell
PSScriptAnalyzer for PowerShell
使い方
Invoke-ScriptAnalyzer SCRIPT
使うまで
Download from GitHub
Install-Module -Name PSScriptAnalyzer or git clone https://github.com/PowerShell/PSScriptAnalyzer or download from https://github.com/PowerShell/PSScriptAnalyzer/releases
PS5.1以降の場合
Install-PackageProvider Nuget –force –verbose Exit
導入確認
Get-ScriptAnalyzerRule
実行
Invoke-ScriptAnalyzer SCRIPT
Usage
Get-ScriptAnalyzerRule [-CustomizedRulePath <string[]>] [-Name <string[]>] [<CommonParameters>] [-Severity <string[]>] Invoke-ScriptAnalyzer [-Path] <string> [-CustomizedRulePath <string[]>] [-ExcludeRule <string[]>] [-IncludeRule <string[]>] [-Severity <string[]>] [-Recurse] [<CommonParameters>]
参考
Readme
https://github.com/PowerShell/PSScriptAnalyzer/blob/development/README.md
GiHub Root https://github.com/PowerShell/PSScriptAnalyzer