[PS] >get-module psscriptanalyzer
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 1.7.0 PSScriptAnalyzer {Get-ScriptAnalyzerRule, Invoke-ScriptAnalyzer}
[PS] >Invoke-ScriptAnalyzer .\AnsibleWinModuleGen.ps1 | Select RuleName,Serverity,Line,Message | fl
RuleName : PSPossibleIncorrectComparisonWithNull
Serverity :
Line : 91
Message : $null should be on the left side of equality comparisons.
RuleName : PSAvoidUsingCmdletAliases
Serverity :
Line : 39
Message : 'where' is an alias of 'Where-Object'. Alias can introduce possible problems and make scripts hard to
maintain. Please consider changing alias to its full content.
RuleName : PSAvoidUsingCmdletAliases
Serverity :
Line : 43
Message : 'foreach' is an alias of 'ForEach-Object'. Alias can introduce possible problems and make scripts hard to
maintain. Please consider changing alias to its full content.
RuleName : PSAvoidUsingCmdletAliases
Serverity :
Line : 44
Message : 'foreach' is an alias of 'ForEach-Object'. Alias can introduce possible problems and make scripts hard to
maintain. Please consider changing alias to its full content.
RuleName : PSAvoidUsingCmdletAliases
Serverity :
Line : 56
Message : 'Select' is an alias of 'Select-Object'. Alias can introduce possible problems and make scripts hard to
maintain. Please consider changing alias to its full content.
RuleName : PSAvoidUsingCmdletAliases
Serverity :
Line : 66
Message : 'Select' is an alias of 'Select-Object'. Alias can introduce possible problems and make scripts hard to
maintain. Please consider changing alias to its full content.
RuleName : PSAvoidUsingCmdletAliases
Serverity :
Line : 144
Message : 'where' is an alias of 'Where-Object'. Alias can introduce possible problems and make scripts hard to
maintain. Please consider changing alias to its full content.
RuleName : PSUseDeclaredVarsMoreThanAssignments
Serverity :
Line : 289
Message : The variable 'counter' is assigned but never used.