diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AlignAssignmentStatement.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AlignAssignmentStatement.md index 18a2541..c12847e 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AlignAssignmentStatement.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AlignAssignmentStatement.md @@ -85,6 +85,37 @@ This parameter controls whether ScriptAnalyzer includes hashtable key-value pair intervening comment when determining alignment. It accepts a boolean value. To exclude these lines, set this parameter to `$false`. The default value is `$true`. +Consider the following: + +```powershell +$hashtable = @{ + property = 'value' + anotherProperty <#A Comment#> = 'another value' + anotherDifferentProperty = 'yet another value' +} +``` + +With this setting disabled, the line with the comment is ignored. The equal signs are aligned for +the remaining lines: + +```powershell +$hashtable = @{ + property = 'value' + anotherProperty <#A Comment#> = 'another value' + anotherDifferentProperty = 'yet another value' +} +``` + +With this setting enabled, the equal signs are aligned for all lines: + +```powershell +$hashtable = @{ + property = 'value' + anotherProperty <#A Comment#> = 'another value' + anotherDifferentProperty = 'yet another value' +} +``` + ### CheckEnum This parameter controls whether ScriptAnalyzer checks assignment alignment in enum member @@ -102,3 +133,34 @@ parameter to `$false`. The default value is `$true`. This parameter controls whether ScriptAnalyzer includes enum members without explicitly assigned values when determining alignment. It accepts a boolean value. To exclude valueless members, set this parameter to `$false`. The default value is `$true`. + +Consider the following: + +```powershell +enum Enum { + member = 1 + anotherMember = 2 + anotherDifferentMember +} +``` + +With this setting disabled, the third line, which has no value, isn't considered when choosing where +to align assignments. + +```powershell +enum Enum { + member = 1 + anotherMember = 2 + anotherDifferentMember +} +``` + +With it enabled, the valueless member is included in alignment as if it had a value: + +```powershell +enum Enum { + member = 1 + anotherMember = 2 + anotherDifferentMember +} +``` \ No newline at end of file diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidAssignmentToAutomaticVariable.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidAssignmentToAutomaticVariable.md index a483bf2..a7dc262 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidAssignmentToAutomaticVariable.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidAssignmentToAutomaticVariable.md @@ -20,6 +20,15 @@ for PowerShell's internal use only, and rely on them only to read state informat To learn more, see [about_Automatic_Variables][01]. + + +## How + +Use variable names in functions or their parameters that do not conflict with automatic variables. + ## Example ### Noncompliant diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidDefaultValueSwitchParameter.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidDefaultValueSwitchParameter.md index e50d150..c34701d 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidDefaultValueSwitchParameter.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidDefaultValueSwitchParameter.md @@ -59,6 +59,7 @@ function Test-Script [switch] $Switch ) + ... } ``` diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidExclaimOperator.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidExclaimOperator.md index dcd2cf9..a6385dc 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidExclaimOperator.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidExclaimOperator.md @@ -33,9 +33,12 @@ $MyVar = !$true $MyVar = -not $true ``` -## Configure rule +## Parameters + +### Enable -To enable this rule, run the following command: +This parameter controls whether ScriptAnalyzer checks the code against this rule. It accepts a +boolean value. To enable this rule, set this parameter to `$true`. The default value is `$false`. ```powershell Rules = @{ @@ -44,10 +47,3 @@ Rules = @{ } } ``` - -## Parameters - -### Enable - -This parameter controls whether ScriptAnalyzer checks the code against this rule. It accepts a -boolean value. To enable this rule, set this parameter to `$true`. The default value is `$false`. diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidGlobalAliases.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidGlobalAliases.md index 2778e08..b72fc62 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidGlobalAliases.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidGlobalAliases.md @@ -1,5 +1,5 @@ --- -description: Avoid global aliases +description: Avoid global aliases. ms.date: 05/28/2026 ms.topic: reference title: AvoidGlobalAliases @@ -15,9 +15,6 @@ aliases can unintentionally override existing aliases in the session, leading to and name collisions. Name collisions make it difficult for module consumers to diagnose issues and maintain code reliability. -This rule is not available in PowerShell version 3 or 4 because it uses the -`StaticParameterBinder.BindCommand` API. - To avoid this issue, define aliases without the **Scope** parameter, or use other appropriate scope modifiers. To learn more, see [about_Scopes][01]. diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidGlobalFunctions.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidGlobalFunctions.md index c3c03d3..80dd839 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidGlobalFunctions.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidGlobalFunctions.md @@ -33,5 +33,4 @@ function functionName {} ``` - [01]: /powershell/module/microsoft.powershell.core/about/about_scopes diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidGlobalVars.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidGlobalVars.md index ba8413e..df473c2 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidGlobalVars.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidGlobalVars.md @@ -1,5 +1,5 @@ --- -description: Avoid global variables +description: Avoid global variables. ms.date: 06/23/2026 ms.topic: reference title: AvoidGlobalVars @@ -57,7 +57,6 @@ $var1 ``` - [01]: /powershell/module/microsoft.powershell.core/about/about_automatic_variables [02]: /powershell/module/microsoft.powershell.core/about/about_preference_variables [03]: /powershell/module/microsoft.powershell.core/about/about_scopes diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidInvokingEmptyMembers.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidInvokingEmptyMembers.md index 4a73730..35631e9 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidInvokingEmptyMembers.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidInvokingEmptyMembers.md @@ -1,5 +1,5 @@ --- -description: Avoid invoking empty members +description: Avoid invoking empty members. ms.date: 05/28/2026 ms.topic: reference title: AvoidInvokingEmptyMembers @@ -34,5 +34,4 @@ $MyString.('length') ``` - [01]: /powershell/module/microsoft.powershell.core/about/about_operators#member-access-operator- diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidNullOrEmptyHelpMessageAttribute.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidNullOrEmptyHelpMessageAttribute.md index 5535f4b..0706e29 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidNullOrEmptyHelpMessageAttribute.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidNullOrEmptyHelpMessageAttribute.md @@ -72,5 +72,4 @@ Function GoodFuncHelpMessage ``` - [01]: /powershell/module/microsoft.powershell.core/about/about_functions_advanced_parameters#helpmessage-argument diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidReservedWordsAsFunctionNames.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidReservedWordsAsFunctionNames.md index 0c7ac00..7fd2117 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidReservedWordsAsFunctionNames.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidReservedWordsAsFunctionNames.md @@ -37,5 +37,4 @@ function myFunction { ``` - [01]: /powershell/module/microsoft.powershell.core/about/about_reserved_words diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidShouldContinueWithoutForce.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidShouldContinueWithoutForce.md index 8a9ce7c..f6fc10d 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidShouldContinueWithoutForce.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidShouldContinueWithoutForce.md @@ -10,8 +10,8 @@ title: AvoidShouldContinueWithoutForce ## Description -This rule detects functions that use `ShouldContinue` without a boolean `Force` parameter. Functions -that use `ShouldContinue` should have a boolean `Force` parameter to allow users to bypass the +This rule detects functions that use `ShouldContinue` without a **Force** parameter. Functions that +use `ShouldContinue` should have a boolean `Force` parameter to allow users to bypass the confirmation prompt. When using `ShouldContinue` in advanced functions, call it after the @@ -60,6 +60,5 @@ Function Test-ShouldContinue ``` - [01]: /powershell/module/microsoft.powershell.core/about/about_functions_cmdletbindingattribute [02]: /powershell/module/microsoft.powershell.core/about/about_functions_advanced_methods diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidTrailingWhitespace.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidTrailingWhitespace.md index 58e7bc8..02c02d2 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidTrailingWhitespace.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidTrailingWhitespace.md @@ -52,5 +52,4 @@ Get-Process ` ``` - [01]: /powershell/module/microsoft.powershell.core/about/about_parsing diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingAllowUnencryptedAuthentication.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingAllowUnencryptedAuthentication.md index 7b04177..2e76b19 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingAllowUnencryptedAuthentication.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingAllowUnencryptedAuthentication.md @@ -34,6 +34,5 @@ Invoke-WebRequest foo ``` - [01]: /powershell/module/microsoft.powershell.utility/invoke-webrequest [02]: /powershell/module/microsoft.powershell.utility/invoke-restmethod diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingConvertToSecureStringWithPlainText.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingConvertToSecureStringWithPlainText.md index 7375671..30a35f2 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingConvertToSecureStringWithPlainText.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingConvertToSecureStringWithPlainText.md @@ -39,6 +39,5 @@ $SecureUserInput = Read-Host 'Please enter your secure code' -AsSecureString ``` - [01]: /dotnet/api/system.security.securestring [02]: https://www.powershellgallery.com/packages/Microsoft.PowerShell.SecretStore diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingPlainTextForPassword.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingPlainTextForPassword.md index 0e7280e..0334ec7 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingPlainTextForPassword.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingPlainTextForPassword.md @@ -60,5 +60,4 @@ function Test-Script ``` - [01]: /dotnet/api/system.security.securestring diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingPositionalParameters.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingPositionalParameters.md index 2f6ecb9..4bd6a78 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingPositionalParameters.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingPositionalParameters.md @@ -41,7 +41,7 @@ Get-Command -Noun ChildItem -Module Microsoft.PowerShell.Management Rules = @{ PSAvoidUsingPositionalParameters = @{ CommandAllowList = 'Join-Path', 'MyCmdletOrScript' - Enable = $true + Enable = $true } } ``` diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingWriteHost.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingWriteHost.md index e6e1539..2160623 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingWriteHost.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingWriteHost.md @@ -42,22 +42,19 @@ Use `Write-Verbose` for informational messages. The user can decide whether to s providing the **Verbose** parameter. ```powershell -function Get-MeaningOfLife -{ +function Get-MeaningOfLife { [CmdletBinding()]Param() # makes it possible to support Verbose output Write-Verbose 'Computing the answer to the ultimate question of life, the universe and everything' Write-Output 42 } -function Show-Something -{ +function Show-Something { Write-Host 'Show something on screen' } ``` - [01]: /powershell/module/microsoft.powershell.utility/write-host [02]: /powershell/module/microsoft.powershell.utility/write-output [03]: /powershell/module/microsoft.powershell.utility/write-verbose diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCUseVerboseMessageInDSCResource.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCUseVerboseMessageInDSCResource.md index 3fa9754..3154111 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCUseVerboseMessageInDSCResource.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/DSCUseVerboseMessageInDSCResource.md @@ -41,5 +41,4 @@ Function Test-Function ``` - [01]: /powershell/module/microsoft.powershell.utility/write-verbose diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/MissingModuleManifestField.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/MissingModuleManifestField.md index 436c783..0b50edf 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/MissingModuleManifestField.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/MissingModuleManifestField.md @@ -49,5 +49,4 @@ All other keys are optional and the order you place them doesn't matter. To lear ``` - [01]: /powershell/module/microsoft.powershell.core/about/about_module_manifests diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/PossibleIncorrectUsageOfAssignmentOperator.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/PossibleIncorrectUsageOfAssignmentOperator.md index 8408ac0..eb8761f 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/PossibleIncorrectUsageOfAssignmentOperator.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/PossibleIncorrectUsageOfAssignmentOperator.md @@ -1,5 +1,5 @@ --- -description: Use equality operator (==) instead of an equal sign (=) as an assignment operator +description: Use the PowerShell equality operator (-eq) instead of assignment (=) in conditional statements ms.date: 06/05/2026 ms.topic: reference title: PossibleIncorrectUsageOfAssignmentOperator @@ -33,8 +33,7 @@ expression in extra parentheses. An exception applies when `$null` is used on th because there's no use case for it. For example: ```powershell -if (($shortVariableName = $SuperLongVariableName['SpecialItem']['AnotherItem'])) -{ +if (($shortVariableName = $SuperLongVariableName['SpecialItem']['AnotherItem'])) { ... } ``` @@ -74,6 +73,5 @@ if ($a = Get-Something) # Only execute action if command returns something and a ``` - [01]: /powershell/module/microsoft.powershell.core/about/about_assignment_operators [02]: /powershell/module/microsoft.powershell.core/about/about_comparison_operators#-eq-and--ne \ No newline at end of file diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/ProvideCommentHelp.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/ProvideCommentHelp.md index f53c0e9..2f7567b 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/ProvideCommentHelp.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/ProvideCommentHelp.md @@ -126,7 +126,6 @@ The possible values are: - `end`: The comment is placed at the end of the function definition body - [01]: /powershell/scripting/developer/help/writing-comment-based-help-topics [02]: /powershell/scripting/developer/help/writing-help-for-windows-powershell-cmdlets [03]: /powershell/utility-modules/platyps/create-help-using-platyps diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/ShouldProcess.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/ShouldProcess.md index cb79562..3778828 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/ShouldProcess.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/ShouldProcess.md @@ -22,7 +22,7 @@ Violations occur when: To fix this violation, ensure that `ShouldProcess` calls are paired with the `SupportsShouldProcess` attribute declaration. -To learn more, see the following articles: +For more information, see the following articles: - [about_Functions_Advanced_Methods][01] - [about_Functions_CmdletBindingAttribute][02] @@ -75,7 +75,6 @@ function Set-File ``` - [01]: /powershell/module/microsoft.powershell.core/about/about_functions_advanced_methods [02]: /powershell/module/microsoft.powershell.core/about/about_Functions_CmdletBindingAttribute [03]: /powershell/scripting/learn/deep-dives/everything-about-shouldprocess diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseApprovedVerbs.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseApprovedVerbs.md index 0223627..6991973 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseApprovedVerbs.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseApprovedVerbs.md @@ -39,5 +39,4 @@ function Update-Item { ``` - [01]: /powershell/scripting/developer/cmdlet/approved-verbs-for-windows-powershell-commands diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleCmdlets.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleCmdlets.md index 7675bcd..cc339f0 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleCmdlets.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleCmdlets.md @@ -62,5 +62,4 @@ The `core-6.0.2-*` files were removed in PSScriptAnalyzer 1.18 because PowerShel end of life. - [01]: https://github.com/PowerShell/PSScriptAnalyzer/blob/main/Utils/New-CommandDataFile.ps1 diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleCommands.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleCommands.md index 229187d..e5c72b6 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleCommands.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleCommands.md @@ -180,6 +180,5 @@ This parameter specifies commands to exclude from compatibility checks. It accep command-name strings. The default value is `@()`. - [01]: https://github.com/PowerShell/PSScriptAnalyzer/tree/main/PSCompatibilityCollector [02]: https://github.com/PowerShell/PSScriptAnalyzer/tree/main/PSCompatibilityCollector/optional_profiles diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleTypes.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleTypes.md index 8b9a633..dc98ecd 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleTypes.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseCompatibleTypes.md @@ -202,6 +202,5 @@ This parameter specifies the full names of types or type accelerators to exclude checks. It accepts an array of type-name strings. The default value is `@()`. - [01]: https://github.com/PowerShell/PSScriptAnalyzer/tree/main/PSCompatibilityCollector [02]: https://github.com/PowerShell/PSScriptAnalyzer/tree/main/PSCompatibilityCollector/optional_profiles diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseConstrainedLanguageMode.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseConstrainedLanguageMode.md index 7661e11..ca2a3b6 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseConstrainedLanguageMode.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseConstrainedLanguageMode.md @@ -279,7 +279,6 @@ Use `IgnoreSignatures = $true` when: - [PowerShell Constrained Language Mode and the Dot-Source Operator][02] - [01]: /powershell/module/microsoft.powershell.core/about/about_language_modes [02]: https://devblogs.microsoft.com/powershell/powershell-constrained-language-mode-and-the-dot-source-operator/ [03]: https://devblogs.microsoft.com/powershell/powershell-constrained-language-mode/ diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseOutputTypeCorrectly.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseOutputTypeCorrectly.md index 9914163..9854cdf 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseOutputTypeCorrectly.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseOutputTypeCorrectly.md @@ -48,5 +48,4 @@ function Get-Foo ``` - [01]: /powershell/module/microsoft.powershell.core/about/about_functions_outputtypeattribute diff --git a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseUsingScopeModifierInNewRunspaces.md b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseUsingScopeModifierInNewRunspaces.md index 17177f7..9245c32 100644 --- a/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseUsingScopeModifierInNewRunspaces.md +++ b/reference/docs-conceptual/PSScriptAnalyzer/Rules/UseUsingScopeModifierInNewRunspaces.md @@ -19,7 +19,7 @@ initialize the variable within the scriptblock itself. This rule applies to: - `Invoke-Command`- Only with the **ComputerName** or **Session** parameter. - `Workflow { InlineScript {} }` (supported only in Windows PowerShell 5.1 and earlier; not - available in PowerShell 7+) + available in PowerShell 6 or higher) - `Foreach-Object` - Only with the **Parallel** parameter - `Start-Job` - `Start-ThreadJob`