Skip to content

Latest commit

 

History

History

Rules

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
description ms.date ms.topic title
List of PSScriptAnalyzer rules
03/27/2024
reference
List of PSScriptAnalyzer rules

PSScriptAnalyzer Rules

The PSScriptAnalyzer contains the following rule definitions.

Rule Severity Enabled by default Configurable
AlignAssignmentStatement Warning No Yes
AvoidAssignmentToAutomaticVariable Warning Yes
AvoidDefaultValueForMandatoryParameter Warning Yes
AvoidDefaultValueSwitchParameter Warning Yes
AvoidExclaimOperator Warning No
AvoidGlobalAliases1 Warning Yes
AvoidGlobalFunctions Warning Yes
AvoidGlobalVars Warning Yes
AvoidInvokingEmptyMembers Warning Yes
AvoidLongLines Warning No Yes
AvoidMultipleTypeAttributes1 Warning Yes
AvoidNullOrEmptyHelpMessageAttribute Warning Yes
AvoidOverwritingBuiltInCmdlets Warning Yes Yes
AvoidSemicolonsAsLineTerminators Warning No
AvoidShouldContinueWithoutForce Warning Yes
AvoidTrailingWhitespace Warning Yes
AvoidUsingAllowUnencryptedAuthentication Warning Yes
AvoidUsingBrokenHashAlgorithms Warning Yes
AvoidUsingCmdletAliases Warning Yes Yes2
AvoidUsingComputerNameHardcoded Error Yes
AvoidUsingConvertToSecureStringWithPlainText Error Yes
AvoidUsingDeprecatedManifestFields Warning Yes
AvoidUsingDoubleQuotesForConstantString Information No
AvoidUsingEmptyCatchBlock Warning Yes
AvoidUsingInvokeExpression Warning Yes
AvoidUsingPlainTextForPassword Warning Yes
AvoidUsingPositionalParameters Warning Yes
AvoidUsingUsernameAndPasswordParams Error Yes
AvoidUsingWMICmdlet Warning Yes
AvoidUsingWriteHost Warning Yes
DSCDscExamplesPresent Information Yes
DSCDscTestsPresent Information Yes
DSCReturnCorrectTypesForDSCFunctions Information Yes
DSCStandardDSCFunctionsInResource Error Yes
DSCUseIdenticalMandatoryParametersForDSC Error Yes
DSCUseIdenticalParametersForDSC Error Yes
DSCUseVerboseMessageInDSCResource Error Yes
MisleadingBacktick Warning Yes
MissingModuleManifestField Warning Yes
PlaceCloseBrace Warning No Yes
PlaceOpenBrace Warning No Yes
PossibleIncorrectComparisonWithNull Warning Yes
PossibleIncorrectUsageOfAssignmentOperator Warning Yes
PossibleIncorrectUsageOfRedirectionOperator Warning Yes
ProvideCommentHelp Information Yes Yes
ReservedCmdletChar Error Yes
ReservedParams Error Yes
ReviewUnusedParameter Warning Yes Yes2
ShouldProcess Warning Yes
UseApprovedVerbs Warning Yes
UseBOMForUnicodeEncodedFile Warning Yes
UseCmdletCorrectly Warning Yes
UseCompatibleCmdlets Warning Yes Yes2
UseCompatibleCommands Warning No Yes
UseCompatibleSyntax Warning No Yes
UseCompatibleTypes Warning No Yes
UseConsistentIndentation Warning No Yes
UseConsistentWhitespace Warning No Yes
UseCorrectCasing Information No Yes
UseDeclaredVarsMoreThanAssignments Warning Yes
UseLiteralInitializerForHashtable Warning Yes
UseOutputTypeCorrectly Information Yes
UseProcessBlockForPipelineCommand Warning Yes
UsePSCredentialType Warning Yes
UseShouldProcessForStateChangingFunctions Warning Yes
UseSingularNouns Warning Yes Yes
UseSupportsShouldProcess Warning Yes
UseToExportFieldsInManifest Warning Yes
UseUsingScopeModifierInNewRunspaces Warning Yes
UseUTF8EncodingForHelpFile Warning Yes
  • 1 Rule is not available on all PowerShell versions, editions, or OS platforms. See the rule's documentation for details.
  • 2 The rule has a configurable property, but the rule can't be disabled like other configurable rules.