diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AlignAssignmentStatement.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AlignAssignmentStatement.md index 88dfcc2..c2709ac 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AlignAssignmentStatement.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AlignAssignmentStatement.md @@ -1,6 +1,5 @@ --- description: Align assignment statement -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: AlignAssignmentStatement diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidAssignmentToAutomaticVariable.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidAssignmentToAutomaticVariable.md index f915325..60d520d 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidAssignmentToAutomaticVariable.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidAssignmentToAutomaticVariable.md @@ -1,6 +1,5 @@ --- description: Changing automatic variables might have undesired side effects -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: AvoidAssignmentToAutomaticVariable @@ -17,6 +16,11 @@ only be assigned in certain special cases to achieve a certain effect as a speci To understand more about automatic variables, see `Get-Help about_Automatic_Variables`. + + ## How Use variable names in functions or their parameters that do not conflict with automatic variables. diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidDefaultValueForMandatoryParameter.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidDefaultValueForMandatoryParameter.md index 2130854..19c9aa7 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidDefaultValueForMandatoryParameter.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidDefaultValueForMandatoryParameter.md @@ -1,6 +1,5 @@ --- description: Avoid Default Value For Mandatory Parameter -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: AvoidDefaultValueForMandatoryParameter diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidDefaultValueSwitchParameter.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidDefaultValueSwitchParameter.md index f2e5901..7cfbbc2 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidDefaultValueSwitchParameter.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidDefaultValueSwitchParameter.md @@ -1,6 +1,5 @@ --- description: Switch Parameters Should Not Default To True -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: AvoidDefaultValueSwitchParameter diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidExclaimOperator.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidExclaimOperator.md index d3454e9..11d078d 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidExclaimOperator.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidExclaimOperator.md @@ -1,6 +1,5 @@ --- description: Avoid exclaim operator -ms.custom: PSSA v1.22.1 ms.date: 03/26/2024 ms.topic: reference title: AvoidExclaimOperator diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidGlobalAliases.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidGlobalAliases.md index f322849..5157ec6 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidGlobalAliases.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidGlobalAliases.md @@ -1,6 +1,5 @@ --- description: Avoid global aliases. -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: AvoidGlobalAliases diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidGlobalFunctions.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidGlobalFunctions.md index 10574d6..f74b094 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidGlobalFunctions.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidGlobalFunctions.md @@ -1,6 +1,5 @@ --- description: Avoid global functions and aliases -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: AvoidGlobalFunctions diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidGlobalVars.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidGlobalVars.md index 23c4d6d..7fa0f6d 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidGlobalVars.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidGlobalVars.md @@ -1,6 +1,5 @@ --- description: No Global Variables -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: AvoidGlobalVars diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidInvokingEmptyMembers.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidInvokingEmptyMembers.md index a335073..6049e86 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidInvokingEmptyMembers.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidInvokingEmptyMembers.md @@ -1,6 +1,5 @@ --- description: Avoid Invoking Empty Members -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: AvoidInvokingEmptyMembers diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidLongLines.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidLongLines.md index 36cd603..cc2603c 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidLongLines.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidLongLines.md @@ -1,6 +1,5 @@ --- description: Avoid long lines -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: AvoidLongLines diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidMultipleTypeAttributes.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidMultipleTypeAttributes.md index 75fcddb..9ccd478 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidMultipleTypeAttributes.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidMultipleTypeAttributes.md @@ -1,6 +1,5 @@ --- description: Avoid multiple type specifiers on parameters. -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: AvoidMultipleTypeAttributes diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidNullOrEmptyHelpMessageAttribute.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidNullOrEmptyHelpMessageAttribute.md index ab7b465..386c960 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidNullOrEmptyHelpMessageAttribute.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidNullOrEmptyHelpMessageAttribute.md @@ -1,6 +1,5 @@ --- description: Avoid using null or empty HelpMessage parameter attribute. -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: AvoidNullOrEmptyHelpMessageAttribute diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidOverwritingBuiltInCmdlets.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidOverwritingBuiltInCmdlets.md index d91c5b3..1d94a61 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidOverwritingBuiltInCmdlets.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidOverwritingBuiltInCmdlets.md @@ -1,6 +1,5 @@ --- description: Avoid overwriting built in cmdlets -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: AvoidOverwritingBuiltInCmdlets diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidSemicolonsAsLineTerminators.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidSemicolonsAsLineTerminators.md index 32319e8..4716238 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidSemicolonsAsLineTerminators.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidSemicolonsAsLineTerminators.md @@ -1,6 +1,5 @@ --- description: Avoid semicolons as line terminators -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: AvoidSemicolonsAsLineTerminators diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidShouldContinueWithoutForce.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidShouldContinueWithoutForce.md index 8aa94d7..189989a 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidShouldContinueWithoutForce.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidShouldContinueWithoutForce.md @@ -1,6 +1,5 @@ --- description: Avoid Using ShouldContinue Without Boolean Force Parameter -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: AvoidShouldContinueWithoutForce diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidTrailingWhitespace.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidTrailingWhitespace.md index 3881317..416948c 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidTrailingWhitespace.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidTrailingWhitespace.md @@ -1,6 +1,5 @@ --- description: Avoid trailing whitespace -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: AvoidTrailingWhitespace diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingAllowUnencryptedAuthentication.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingAllowUnencryptedAuthentication.md index 821c7b4..20451e6 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingAllowUnencryptedAuthentication.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingAllowUnencryptedAuthentication.md @@ -1,6 +1,5 @@ --- description: Avoid sending credentials and secrets over unencrypted connections -ms.custom: PSSA v1.22.1 ms.date: 02/28/2024 ms.topic: reference title: AvoidUsingAllowUnencryptedAuthentication diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingBrokenHashAlgorithms.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingBrokenHashAlgorithms.md index af233b8..32bb464 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingBrokenHashAlgorithms.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingBrokenHashAlgorithms.md @@ -1,6 +1,5 @@ --- description: Avoid using broken hash algorithms -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: AvoidUsingBrokenHashAlgorithms diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingCmdletAliases.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingCmdletAliases.md index 9064ca3..48c914e 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingCmdletAliases.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingCmdletAliases.md @@ -1,6 +1,5 @@ --- description: Avoid Using Cmdlet Aliases or omitting the 'Get-' prefix. -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: AvoidUsingCmdletAliases diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingComputerNameHardcoded.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingComputerNameHardcoded.md index 1ab0753..83a60c9 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingComputerNameHardcoded.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingComputerNameHardcoded.md @@ -1,6 +1,5 @@ --- description: Avoid Using ComputerName Hardcoded -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: AvoidUsingComputerNameHardcoded diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingConvertToSecureStringWithPlainText.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingConvertToSecureStringWithPlainText.md index 1231e62..f3dfc76 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingConvertToSecureStringWithPlainText.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingConvertToSecureStringWithPlainText.md @@ -1,6 +1,5 @@ --- description: Avoid Using SecureString With Plain Text -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: AvoidUsingConvertToSecureStringWithPlainText diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingDeprecatedManifestFields.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingDeprecatedManifestFields.md index 7af136a..802304d 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingDeprecatedManifestFields.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingDeprecatedManifestFields.md @@ -1,6 +1,5 @@ --- description: Avoid Using Deprecated Manifest Fields -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: AvoidUsingDeprecatedManifestFields diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingDoubleQuotesForConstantString.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingDoubleQuotesForConstantString.md index 1dfc191..19c83fa 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingDoubleQuotesForConstantString.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingDoubleQuotesForConstantString.md @@ -1,6 +1,5 @@ --- description: Avoid using double quotes if the string is constant. -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: AvoidUsingDoubleQuotesForConstantString diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingEmptyCatchBlock.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingEmptyCatchBlock.md index 62166d7..1983417 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingEmptyCatchBlock.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingEmptyCatchBlock.md @@ -1,6 +1,5 @@ --- description: Avoid Using Empty Catch Block -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: AvoidUsingEmptyCatchBlock diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingInvokeExpression.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingInvokeExpression.md index 4027684..7779008 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingInvokeExpression.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingInvokeExpression.md @@ -1,6 +1,5 @@ --- description: Avoid Using Invoke-Expression -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: AvoidUsingInvokeExpression diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingPlainTextForPassword.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingPlainTextForPassword.md index 50b7652..c25123e 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingPlainTextForPassword.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingPlainTextForPassword.md @@ -1,6 +1,5 @@ --- description: Avoid Using Plain Text For Password Parameter -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: AvoidUsingPlainTextForPassword diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingPositionalParameters.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingPositionalParameters.md index c4707f7..1a1b77d 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingPositionalParameters.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingPositionalParameters.md @@ -1,6 +1,5 @@ --- description: Avoid Using Positional Parameters -ms.custom: PSSA v1.22.1 ms.date: 02/13/2024 ms.topic: reference title: AvoidUsingPositionalParameters diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingUsernameAndPasswordParams.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingUsernameAndPasswordParams.md index 7f7ec14..32fbac3 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingUsernameAndPasswordParams.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingUsernameAndPasswordParams.md @@ -1,6 +1,5 @@ --- description: Avoid Using Username and Password Parameters -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: AvoidUsingUsernameAndPasswordParams diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingWMICmdlet.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingWMICmdlet.md index 6885b70..96e7167 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingWMICmdlet.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingWMICmdlet.md @@ -1,6 +1,5 @@ --- description: Avoid Using Get-WMIObject, Remove-WMIObject, Invoke-WmiMethod, Register-WmiEvent, Set-WmiInstance -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: AvoidUsingWMICmdlet diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingWriteHost.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingWriteHost.md index 5239ca7..5619141 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingWriteHost.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingWriteHost.md @@ -1,6 +1,5 @@ --- description: Avoid Using Write-Host -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: AvoidUsingWriteHost diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCDscExamplesPresent.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCDscExamplesPresent.md index 8b8b74a..b2b1cf6 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCDscExamplesPresent.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCDscExamplesPresent.md @@ -1,6 +1,5 @@ --- description: DSC examples are present -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: DSCDscExamplesPresent diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCDscTestsPresent.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCDscTestsPresent.md index 81c61e7..f8fe319 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCDscTestsPresent.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCDscTestsPresent.md @@ -1,6 +1,5 @@ --- description: Dsc tests are present -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: DSCDscTestsPresent diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCReturnCorrectTypesForDSCFunctions.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCReturnCorrectTypesForDSCFunctions.md index d26b491..1681852 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCReturnCorrectTypesForDSCFunctions.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCReturnCorrectTypesForDSCFunctions.md @@ -1,6 +1,5 @@ --- description: Return Correct Types For DSC Functions -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: DSCReturnCorrectTypesForDSCFunctions diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCStandardDSCFunctionsInResource.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCStandardDSCFunctionsInResource.md index 89cd4b6..f455d74 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCStandardDSCFunctionsInResource.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCStandardDSCFunctionsInResource.md @@ -1,6 +1,5 @@ --- description: Use Standard Get/Set/Test TargetResource functions in DSC Resource -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: DSCStandardDSCFunctionsInResource diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCUseIdenticalMandatoryParametersForDSC.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCUseIdenticalMandatoryParametersForDSC.md index ad0b799..dc8e9e9 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCUseIdenticalMandatoryParametersForDSC.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCUseIdenticalMandatoryParametersForDSC.md @@ -1,6 +1,5 @@ --- description: Use identical mandatory parameters for DSC Get/Test/Set TargetResource functions -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: DSCUseIdenticalMandatoryParametersForDSC diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCUseIdenticalParametersForDSC.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCUseIdenticalParametersForDSC.md index d6581a7..8f8e98e 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCUseIdenticalParametersForDSC.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCUseIdenticalParametersForDSC.md @@ -1,6 +1,5 @@ --- description: Use Identical Parameters For DSC Test and Set Functions -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: DSCUseIdenticalParametersForDSC diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCUseVerboseMessageInDSCResource.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCUseVerboseMessageInDSCResource.md index 73a3637..bb5abac 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCUseVerboseMessageInDSCResource.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCUseVerboseMessageInDSCResource.md @@ -1,6 +1,5 @@ --- description: Use verbose message in DSC resource -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: DSCUseVerboseMessageInDSCResource diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/MisleadingBacktick.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/MisleadingBacktick.md index b2c4694..e140b8e 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/MisleadingBacktick.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/MisleadingBacktick.md @@ -1,6 +1,5 @@ --- description: Misleading Backtick -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: MisleadingBacktick diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/MissingModuleManifestField.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/MissingModuleManifestField.md index bf12036..c19d534 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/MissingModuleManifestField.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/MissingModuleManifestField.md @@ -1,6 +1,5 @@ --- description: Module Manifest Fields -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: MissingModuleManifestField diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/PlaceCloseBrace.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/PlaceCloseBrace.md index 31191b4..6e14acc 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/PlaceCloseBrace.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/PlaceCloseBrace.md @@ -1,6 +1,5 @@ --- description: Place close braces -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: PlaceCloseBrace diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/PlaceOpenBrace.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/PlaceOpenBrace.md index cd68fef..faa6d4c 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/PlaceOpenBrace.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/PlaceOpenBrace.md @@ -1,6 +1,5 @@ --- description: Place open braces consistently -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: PlaceOpenBrace diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/PossibleIncorrectComparisonWithNull.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/PossibleIncorrectComparisonWithNull.md index c683458..28c9c70 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/PossibleIncorrectComparisonWithNull.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/PossibleIncorrectComparisonWithNull.md @@ -1,6 +1,5 @@ --- description: Null Comparison -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: PossibleIncorrectComparisonWithNull diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/PossibleIncorrectUsageOfAssignmentOperator.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/PossibleIncorrectUsageOfAssignmentOperator.md index 193b007..bbaf437 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/PossibleIncorrectUsageOfAssignmentOperator.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/PossibleIncorrectUsageOfAssignmentOperator.md @@ -1,6 +1,5 @@ --- description: Equal sign is not an assignment operator. Did you mean the equality operator \'-eq\'? -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: PossibleIncorrectUsageOfAssignmentOperator diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/PossibleIncorrectUsageOfRedirectionOperator.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/PossibleIncorrectUsageOfRedirectionOperator.md index 5260dbd..871d134 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/PossibleIncorrectUsageOfRedirectionOperator.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/PossibleIncorrectUsageOfRedirectionOperator.md @@ -1,6 +1,5 @@ --- description: \'>\' is not a comparison operator. Use \'-gt\' (greater than) or \'-ge\' (greater or equal). -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: PossibleIncorrectUsageOfRedirectionOperator diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/ProvideCommentHelp.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/ProvideCommentHelp.md index 267230e..d7570ea 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/ProvideCommentHelp.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/ProvideCommentHelp.md @@ -1,6 +1,5 @@ --- description: Basic Comment Help -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: ProvideCommentHelp diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/README.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/README.md index cbd6d5b..06f27d2 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/README.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/README.md @@ -1,6 +1,5 @@ --- description: List of PSScriptAnalyzer rules -ms.custom: PSSA v1.22.1 ms.date: 03/27/2024 ms.topic: reference title: List of PSScriptAnalyzer rules diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/ReservedCmdletChar.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/ReservedCmdletChar.md index d2b0645..55acfc7 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/ReservedCmdletChar.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/ReservedCmdletChar.md @@ -1,6 +1,5 @@ --- description: Reserved Cmdlet Chars -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: ReservedCmdletChar diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/ReservedParams.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/ReservedParams.md index 15856c8..f0b6e5f 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/ReservedParams.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/ReservedParams.md @@ -1,6 +1,5 @@ --- description: Reserved Parameters -ms.custom: PSSA v1.22.1 ms.date: 03/06/2024 ms.topic: reference title: ReservedParams diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/ReviewUnusedParameter.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/ReviewUnusedParameter.md index cae6750..4732b8a 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/ReviewUnusedParameter.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/ReviewUnusedParameter.md @@ -1,6 +1,5 @@ --- description: ReviewUnusedParameter -ms.custom: PSSA v1.22.1 ms.date: 03/26/2024 ms.topic: reference title: ReviewUnusedParameter diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/ShouldProcess.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/ShouldProcess.md index 9a84ebc..0bdb73d 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/ShouldProcess.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/ShouldProcess.md @@ -1,6 +1,5 @@ --- description: Should Process -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: ShouldProcess diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseApprovedVerbs.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseApprovedVerbs.md index 0cff7ae..9d77872 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseApprovedVerbs.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseApprovedVerbs.md @@ -1,6 +1,5 @@ --- description: Cmdlet Verbs -ms.custom: PSSA v1.22.1 ms.date: 03/26/2024 ms.topic: reference title: UseApprovedVerbs diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseBOMForUnicodeEncodedFile.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseBOMForUnicodeEncodedFile.md index 4b2046c..6fffaa7 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseBOMForUnicodeEncodedFile.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseBOMForUnicodeEncodedFile.md @@ -1,6 +1,5 @@ --- description: Use BOM encoding for non-ASCII files -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: UseBOMForUnicodeEncodedFile diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCmdletCorrectly.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCmdletCorrectly.md index 6dcdc7e..81ec42e 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCmdletCorrectly.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCmdletCorrectly.md @@ -1,6 +1,5 @@ --- description: Use Cmdlet Correctly -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: UseCmdletCorrectly diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleCmdlets.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleCmdlets.md index eccb51d..1fc9520 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleCmdlets.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleCmdlets.md @@ -1,6 +1,5 @@ --- description: Use compatible cmdlets -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: UseCompatibleCmdlets diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleCommands.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleCommands.md index 80489a0..7857bdf 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleCommands.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleCommands.md @@ -1,7 +1,6 @@ --- description: Use compatible commands -ms.custom: PSSA v1.22.1 -ms.date: 06/17/2024 +ms.date: 10/10/2024 ms.topic: reference title: UseCompatibleCommands --- @@ -47,35 +46,33 @@ your configuration. Platforms bundled by default are: -| PowerShell Version | Operating System | ID | -| ------------------ | --------------------- | --------------------------------------------------------------------- | -| 3.0 | Windows Server 2012 | `win-8_x64_6.2.9200.0_3.0_x64_4.0.30319.42000_framework` | -| 4.0 | Windows Server 2012R2 | `win-8_x64_6.3.9600.0_4.0_x64_4.0.30319.42000_framework` | -| 5.1 | Windows Server 2016 | `win-8_x64_10.0.14393.0_5.1.14393.2791_x64_4.0.30319.42000_framework` | -| 5.1 | Windows Server 2019 | `win-8_x64_10.0.17763.0_5.1.17763.316_x64_4.0.30319.42000_framework` | -| 5.1 | Windows 10 1809 (RS5) | `win-48_x64_10.0.17763.0_5.1.17763.316_x64_4.0.30319.42000_framework` | -| 6.2 | Windows Server 2016 | `win-8_x64_10.0.14393.0_6.2.4_x64_4.0.30319.42000_core` | -| 6.2 | Windows Server 2019 | `win-8_x64_10.0.17763.0_6.2.4_x64_4.0.30319.42000_core` | -| 6.2 | Windows 10 1809 (RS5) | `win-4_x64_10.0.17763.0_6.2.4_x64_4.0.30319.42000_core` | -| 6.2 | Ubuntu 18.04 LTS | `ubuntu_x64_18.04_6.2.4_x64_4.0.30319.42000_core` | -| 7.0 | Windows Server 2016 | `win-8_x64_10.0.14393.0_7.0.0_x64_3.1.2_core` | -| 7.0 | Windows Server 2019 | `win-8_x64_10.0.17763.0_7.0.0_x64_3.1.2_core` | -| 7.0 | Windows 10 1809 (RS5) | `win-4_x64_10.0.17763.0_6.2.4_x64_3.1.2_core` | -| 7.0 | Ubuntu 18.04 LTS | `ubuntu_x64_18.04_7.0.0_x64_3.1.2_core` | - -Other profiles can be found in the -[GitHub repo](https://github.com/PowerShell/PSScriptAnalyzer/tree/development/PSCompatibilityCollector/optional_profiles). - -You can also generate your own platform profile using the -[PSCompatibilityCollector module](https://github.com/PowerShell/PSScriptAnalyzer/tree/development/PSCompatibilityCollector). +| PowerShell Version | Operating System | ID | +| :----------------: | ---------------------- | --------------------------------------------------------------------- | +| 3.0 | Windows Server 2012 | `win-8_x64_6.2.9200.0_3.0_x64_4.0.30319.42000_framework` | +| 4.0 | Windows Server 2012 R2 | `win-8_x64_6.3.9600.0_4.0_x64_4.0.30319.42000_framework` | +| 5.1 | Windows Server 2016 | `win-8_x64_10.0.14393.0_5.1.14393.2791_x64_4.0.30319.42000_framework` | +| 5.1 | Windows Server 2019 | `win-8_x64_10.0.17763.0_5.1.17763.316_x64_4.0.30319.42000_framework` | +| 5.1 | Windows 10 Pro | `win-48_x64_10.0.17763.0_5.1.17763.316_x64_4.0.30319.42000_framework` | +| 6.2 | Ubuntu 18.04 LTS | `ubuntu_x64_18.04_6.2.4_x64_4.0.30319.42000_core` | +| 6.2 | Windows 10.0.14393 | `win-8_x64_10.0.14393.0_6.2.4_x64_4.0.30319.42000_core` | +| 6.2 | Windows 10.0.17763 | `win-8_x64_10.0.17763.0_6.2.4_x64_4.0.30319.42000_core` | +| 6.2 | Windows 10.0.18362 | `win-4_x64_10.0.18362.0_6.2.4_x64_4.0.30319.42000_core` | +| 7.0 | Ubuntu 18.04 LTS | `ubuntu_x64_18.04_7.0.0_x64_3.1.2_core` | +| 7.0 | Windows 10.0.14393 | `win-8_x64_10.0.14393.0_7.0.0_x64_3.1.2_core` | +| 7.0 | Windows 10.0.17763 | `win-8_x64_10.0.17763.0_7.0.0_x64_3.1.2_core` | +| 7.0 | Windows 10.0.18362 | `win-4_x64_10.0.18362.0_7.0.0_x64_3.1.2_core` | + +Other profiles can be found in the [GitHub repo][02]. + +You can also generate your own platform profile using the [PSCompatibilityCollector module][01]. The compatibility profile settings takes a list of platforms to target under `TargetProfiles`. A platform can be specified as: - A platform name (like `ubuntu_x64_18.04_6.1.1_x64_4.0.30319.42000_core`), which will have `.json` added to the end and is searched for in the default profile directory. -- A filename (like `my_custom_platform.json`), which will be searched for the in the default - profile directory. +- A filename (like `my_custom_platform.json`), which will be searched for the in the default profile + directory. - An absolute path to a file (like `D:\PowerShellProfiles\TargetMachine.json`). The default profile directory is under the PSScriptAnalzyer module at @@ -83,7 +80,7 @@ The default profile directory is under the PSScriptAnalzyer module at containing `PSScriptAnalyzer.psd1`). The compatibility analysis compares a command used to both a target profile and a 'union' profile -(containing all commands available in *any* profile in the profile dir). If a command is not present +(containing all commands available in _any_ profile in the profile dir). If a command is not present in the union profile, it is assumed to be locally created and ignored. Otherwise, if a command is present in the union profile but not present in a target, it is deemed to be incompatible with that target. @@ -132,11 +129,17 @@ scriptblock as with other rules. The rule can also be suppressed only for particular commands: ```powershell -[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseCompatibleCommands', 'Start-Service')] +[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseCompatibleCommands', + 'Start-Service')] ``` And also suppressed only for parameters: ```powershell -[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseCompatibleCommands', 'Import-Module/FullyQualifiedName')] +[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseCompatibleCommands', + 'Import-Module/FullyQualifiedName')] ``` + + +[01]: https://github.com/PowerShell/PSScriptAnalyzer/tree/development/PSCompatibilityCollector +[02]: https://github.com/PowerShell/PSScriptAnalyzer/tree/development/PSCompatibilityCollector/optional_profiles diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleSyntax.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleSyntax.md index 7ba1985..a2adbbb 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleSyntax.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleSyntax.md @@ -1,6 +1,5 @@ --- description: Use compatible syntax -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: UseCompatibleSyntax diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleTypes.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleTypes.md index 6998b8d..99243e5 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleTypes.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleTypes.md @@ -1,7 +1,6 @@ --- description: Use compatible types -ms.custom: PSSA v1.22.1 -ms.date: 06/17/2024 +ms.date: 10/10/2024 ms.topic: reference title: UseCompatibleTypes --- @@ -48,27 +47,25 @@ your configuration. Platforms bundled by default are: -| PowerShell Version | Operating System | ID | -| ------------------ | --------------------- | --------------------------------------------------------------------- | -| 3.0 | Windows Server 2012 | `win-8_x64_6.2.9200.0_3.0_x64_4.0.30319.42000_framework` | -| 4.0 | Windows Server 2012R2 | `win-8_x64_6.3.9600.0_4.0_x64_4.0.30319.42000_framework` | -| 5.1 | Windows Server 2016 | `win-8_x64_10.0.14393.0_5.1.14393.2791_x64_4.0.30319.42000_framework` | -| 5.1 | Windows Server 2019 | `win-8_x64_10.0.17763.0_5.1.17763.316_x64_4.0.30319.42000_framework` | -| 5.1 | Windows 10 1809 (RS5) | `win-48_x64_10.0.17763.0_5.1.17763.316_x64_4.0.30319.42000_framework` | -| 6.2 | Windows Server 2016 | `win-8_x64_10.0.14393.0_6.2.4_x64_4.0.30319.42000_core` | -| 6.2 | Windows Server 2019 | `win-8_x64_10.0.17763.0_6.2.4_x64_4.0.30319.42000_core` | -| 6.2 | Windows 10 1809 (RS5) | `win-4_x64_10.0.17763.0_6.2.4_x64_4.0.30319.42000_core` | -| 6.2 | Ubuntu 18.04 LTS | `ubuntu_x64_18.04_6.2.4_x64_4.0.30319.42000_core` | -| 7.0 | Windows Server 2016 | `win-8_x64_10.0.14393.0_7.0.0_x64_3.1.2_core` | -| 7.0 | Windows Server 2019 | `win-8_x64_10.0.17763.0_7.0.0_x64_3.1.2_core` | -| 7.0 | Windows 10 1809 (RS5) | `win-4_x64_10.0.17763.0_6.2.4_x64_3.1.2_core` | -| 7.0 | Ubuntu 18.04 LTS | `ubuntu_x64_18.04_7.0.0_x64_3.1.2_core` | - -Other profiles can be found in the -[GitHub repo](https://github.com/PowerShell/PSScriptAnalyzer/tree/development/PSCompatibilityCollector/optional_profiles). - -You can also generate your own platform profile using the -[PSCompatibilityCollector module](https://github.com/PowerShell/PSScriptAnalyzer/tree/development/PSCompatibilityCollector). +| PowerShell Version | Operating System | ID | +| :----------------: | ---------------------- | --------------------------------------------------------------------- | +| 3.0 | Windows Server 2012 | `win-8_x64_6.2.9200.0_3.0_x64_4.0.30319.42000_framework` | +| 4.0 | Windows Server 2012 R2 | `win-8_x64_6.3.9600.0_4.0_x64_4.0.30319.42000_framework` | +| 5.1 | Windows Server 2016 | `win-8_x64_10.0.14393.0_5.1.14393.2791_x64_4.0.30319.42000_framework` | +| 5.1 | Windows Server 2019 | `win-8_x64_10.0.17763.0_5.1.17763.316_x64_4.0.30319.42000_framework` | +| 5.1 | Windows 10 Pro | `win-48_x64_10.0.17763.0_5.1.17763.316_x64_4.0.30319.42000_framework` | +| 6.2 | Ubuntu 18.04 LTS | `ubuntu_x64_18.04_6.2.4_x64_4.0.30319.42000_core` | +| 6.2 | Windows 10.0.14393 | `win-8_x64_10.0.14393.0_6.2.4_x64_4.0.30319.42000_core` | +| 6.2 | Windows 10.0.17763 | `win-8_x64_10.0.17763.0_6.2.4_x64_4.0.30319.42000_core` | +| 6.2 | Windows 10.0.18362 | `win-4_x64_10.0.18362.0_6.2.4_x64_4.0.30319.42000_core` | +| 7.0 | Ubuntu 18.04 LTS | `ubuntu_x64_18.04_7.0.0_x64_3.1.2_core` | +| 7.0 | Windows 10.0.14393 | `win-8_x64_10.0.14393.0_7.0.0_x64_3.1.2_core` | +| 7.0 | Windows 10.0.17763 | `win-8_x64_10.0.17763.0_7.0.0_x64_3.1.2_core` | +| 7.0 | Windows 10.0.18362 | `win-4_x64_10.0.18362.0_7.0.0_x64_3.1.2_core` | + +Other profiles can be found in the [GitHub repo][02]. + +You can also generate your own platform profile using the [PSCompatibilityCollector module][01]. The compatibility profile settings takes a list of platforms to target under `TargetProfiles`. A platform can be specified as: @@ -131,7 +128,7 @@ PS> $settings = @{ } } } -PS> Invoke-ScriptAnalyzer -Settings $settings -ScriptDefinition '[System.Management.Automation.SemanticVersion]'1.18.0-rc1'' +PS> Invoke-ScriptAnalyzer -Settings $settings -ScriptDefinition "[System.Management.Automation.SemanticVersion]'1.18.0-rc1'" RuleName Severity ScriptName Line Message -------- -------- ---------- ---- ------- @@ -152,11 +149,17 @@ scriptblock as with other rules. The rule can also be suppressed only for particular types: ```powershell -[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseCompatibleTypes', 'System.Management.Automation.Security.SystemPolicy')] +[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseCompatibleTypes', + 'System.Management.Automation.Security.SystemPolicy')] ``` And also suppressed only for type members: ```powershell -[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseCompatibleCommands', 'System.Management.Automation.LanguagePrimitives/ConvertTypeNameToPSTypeName')] +[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseCompatibleCommands', + 'System.Management.Automation.LanguagePrimitives/ConvertTypeNameToPSTypeName')] ``` + + +[01]: https://github.com/PowerShell/PSScriptAnalyzer/tree/development/PSCompatibilityCollector +[02]: https://github.com/PowerShell/PSScriptAnalyzer/tree/development/PSCompatibilityCollector/optional_profiles diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseConsistentIndentation.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseConsistentIndentation.md index b857858..f084d5a 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseConsistentIndentation.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseConsistentIndentation.md @@ -1,6 +1,5 @@ --- description: Use consistent indentation -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: UseConsistentIndentation diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseConsistentWhitespace.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseConsistentWhitespace.md index e0c6c10..e36c427 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseConsistentWhitespace.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseConsistentWhitespace.md @@ -1,6 +1,5 @@ --- description: Use whitespaces -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: UseConsistentWhitespace diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCorrectCasing.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCorrectCasing.md index ad9e168..f64a788 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCorrectCasing.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCorrectCasing.md @@ -1,6 +1,5 @@ --- description: Use exact casing of cmdlet/function/parameter name. -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: UseCorrectCasing diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseDeclaredVarsMoreThanAssignments.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseDeclaredVarsMoreThanAssignments.md index 52e248b..e316dbf 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseDeclaredVarsMoreThanAssignments.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseDeclaredVarsMoreThanAssignments.md @@ -1,6 +1,5 @@ --- description: Extra Variables -ms.custom: PSSA v1.22.1 ms.date: 03/06/2024 ms.topic: reference title: UseDeclaredVarsMoreThanAssignments diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseLiteralInitializerForHashtable.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseLiteralInitializerForHashtable.md index 4b29678..16f9a2f 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseLiteralInitializerForHashtable.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseLiteralInitializerForHashtable.md @@ -1,6 +1,5 @@ --- description: Create hashtables with literal initializers -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: UseLiteralInitializerForHashtable diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseOutputTypeCorrectly.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseOutputTypeCorrectly.md index 4bd18b6..733425f 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseOutputTypeCorrectly.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseOutputTypeCorrectly.md @@ -1,6 +1,5 @@ --- description: Use OutputType Correctly -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: UseOutputTypeCorrectly diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UsePSCredentialType.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UsePSCredentialType.md index 56ba177..c962762 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UsePSCredentialType.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UsePSCredentialType.md @@ -1,6 +1,5 @@ --- description: Use PSCredential type. -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: UsePSCredentialType diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseProcessBlockForPipelineCommand.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseProcessBlockForPipelineCommand.md index 197e4fb..2e56308 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseProcessBlockForPipelineCommand.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseProcessBlockForPipelineCommand.md @@ -1,6 +1,5 @@ --- description: Use process block for command that accepts input from pipeline. -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: UseProcessBlockForPipelineCommand diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseShouldProcessForStateChangingFunctions.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseShouldProcessForStateChangingFunctions.md index a895c3e..f0e102d 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseShouldProcessForStateChangingFunctions.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseShouldProcessForStateChangingFunctions.md @@ -1,6 +1,5 @@ --- description: Use ShouldProcess For State Changing Functions -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: UseShouldProcessForStateChangingFunctions diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseSingularNouns.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseSingularNouns.md index 076aedf..3997c06 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseSingularNouns.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseSingularNouns.md @@ -1,6 +1,5 @@ --- description: Cmdlet Singular Noun -ms.custom: PSSA v1.22.1 ms.date: 03/27/2024 ms.topic: reference title: UseSingularNouns diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseSupportsShouldProcess.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseSupportsShouldProcess.md index ddc7c5c..04ca2bf 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseSupportsShouldProcess.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseSupportsShouldProcess.md @@ -1,6 +1,5 @@ --- description: Use SupportsShouldProcess -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: UseSupportsShouldProcess diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseToExportFieldsInManifest.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseToExportFieldsInManifest.md index 08be69f..5faaf9d 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseToExportFieldsInManifest.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseToExportFieldsInManifest.md @@ -1,6 +1,5 @@ --- description: Use the *ToExport module manifest fields. -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: UseToExportFieldsInManifest diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseUTF8EncodingForHelpFile.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseUTF8EncodingForHelpFile.md index c4a05cc..31c525d 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseUTF8EncodingForHelpFile.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseUTF8EncodingForHelpFile.md @@ -1,6 +1,5 @@ --- description: Use UTF8 Encoding For Help File -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: UseUTF8EncodingForHelpFile diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseUsingScopeModifierInNewRunspaces.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseUsingScopeModifierInNewRunspaces.md index 62ddfc2..bde0f66 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseUsingScopeModifierInNewRunspaces.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseUsingScopeModifierInNewRunspaces.md @@ -1,6 +1,5 @@ --- description: Use 'Using:' scope modifier in RunSpace ScriptBlocks -ms.custom: PSSA v1.22.1 ms.date: 06/28/2023 ms.topic: reference title: UseUsingScopeModifierInNewRunspaces diff --git a/reference/docs-conceptual/PSScriptAnalyzer/overview.md b/reference/docs-conceptual/PSScriptAnalyzer/overview.md index e28986f..09f7d3c 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/overview.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/overview.md @@ -1,6 +1,6 @@ --- description: This article explains the purpose of the PSScriptAnalyzer module. -ms.date: 11/10/2023 +ms.date: 10/10/2024 title: PSScriptAnalyzer module --- # PSScriptAnalyzer module @@ -27,8 +27,8 @@ is easier to read, and is more maintainable. Supported PowerShell Versions and Platforms -- Windows PowerShell 3.0 or greater -- PowerShell 7.0.11 or greater on Windows/Linux/macOS +- Windows PowerShell 5.1 or greater +- PowerShell 7.2.11 or greater on Windows/Linux/macOS Install using PowerShellGet 2.x: diff --git a/reference/docs-conceptual/PSScriptAnalyzer/whats-new-in-pssa.md b/reference/docs-conceptual/PSScriptAnalyzer/whats-new-in-pssa.md index b9f67c2..94ef767 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/whats-new-in-pssa.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/whats-new-in-pssa.md @@ -1,16 +1,20 @@ --- description: This article lists the updates to the PSScriptAnalyzer module. -ms.date: 04/25/2024 +ms.date: 10/10/2024 title: What's new in PSScriptAnalyzer --- # What's new in PSScriptAnalyzer PSScriptAnalyzer is a static code checker for PowerShell modules and scripts. This article outlines -the changes in each version of PSScriptAnalyzer. +the important changes in PSScriptAnalyzer. For a full list of changes, see the PSScriptAnalyzer +[CHANGELOG][01]. + +## PSScriptAnalyzer 1.23.0 - 2024-10-09 -## PSScriptAnalyzer 1.22.1 - 2024-04-25 +Small maintenance release to update the build pipeline and fix two issues: -Small maintenance release to update the build pipeline. No changes to PSScriptAnalyzer. +- Fix property name in type definition XML +- Update `PSUseConsistentWhitespace` to handle redirect operators that aren't in stream order ## PSScriptAnalyzer 1.22.0 - 2024-03-05 diff --git a/reference/docs-conceptual/toc.yml b/reference/docs-conceptual/toc.yml index e7aa558..3fc675c 100644 --- a/reference/docs-conceptual/toc.yml +++ b/reference/docs-conceptual/toc.yml @@ -35,7 +35,7 @@ items: href: PlatyPS/overview.md - name: Create help using PlatyPS href: PlatyPS/create-help-using-platyps.md - - name: PSScriptAnalyzer v1.22 + - name: PSScriptAnalyzer v1.23 items: - name: Overview href: PSScriptAnalyzer/overview.md