Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: Use the same pattern when defining parameters
ms.date: 07/21/2026
ms.date: 07/23/2026
ms.topic: reference
title: UseConsistentParametersKind
---
Expand Down Expand Up @@ -43,6 +43,7 @@ function g {
Rules = @{
PSUseConsistentParametersKind = @{
Enable = $true
ParametersKind = 'ParamBlock'
}
}
```
Expand All @@ -53,3 +54,9 @@ Rules = @{

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`.

## ParametersKind

Use this parameter to specify the type of parameter definition pattern that should be used
consistently across all functions. It accepts a string value, which can be either `Inline` or
`ParamBlock`. The default value is `ParamBlock`.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ boolean value. To disable this rule, set this parameter to `$false`. The default

### NounAllowList

This parameter specifies which noun commands to exclude from this rule. It accepts a string value.
This parameter specifies which noun commands to exclude from this rule. It accepts a string array.
Both `Data` and `Windows` are common false positives and excluded by default. Default values are
`'Data'` and `'Windows'`.
Comment on lines +71 to 73