Skip to content

Commit 49e42d8

Browse files
authored
Clarify DefaultParameterSetName usage in documentation
1 parent 2678cf8 commit 49e42d8

4 files changed

Lines changed: 16 additions & 24 deletions

File tree

reference/5.1/Microsoft.PowerShell.Core/About/about_Parameter_Sets.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,10 @@ Setting the `ParameterSetName` of a the **Parameter** attribute to
7373
cases the parameter belongs to all parameter sets.
7474

7575
> [!NOTE]
76-
> `DefaultParameterSetName` should not be explicitly set to `__AllParameterSets`.
77-
78-
The **CmdletBinding** attribute allows the `DefaultParameterSetName` to be
79-
explicitly set to `__AllParameterSets`. This is not recommended as it causes
80-
creation of an explicit parameter set which cannot be properly referenced by the
81-
**Parameter** attribute.
76+
> The **CmdletBinding** attribute doesn't prevent you from setting the
77+
> `DefaultParameterSetName` to be to `__AllParameterSets`. If you do this,
78+
> PowerShell creates an explicit parameter set that can't be properly
79+
> referenced by the **Parameter** attribute.
8280
8381
## Examples
8482

reference/7.4/Microsoft.PowerShell.Core/About/about_Parameter_Sets.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,10 @@ Setting the `ParameterSetName` of a the **Parameter** attribute to
7373
cases the parameter belongs to all parameter sets.
7474

7575
> [!NOTE]
76-
> `DefaultParameterSetName` should not be explicitly set to `__AllParameterSets`.
77-
78-
The **CmdletBinding** attribute allows the `DefaultParameterSetName` to be
79-
explicitly set to `__AllParameterSets`. This is not recommended as it causes
80-
creation of an explicit parameter set which cannot be properly referenced by the
81-
**Parameter** attribute.
76+
> The **CmdletBinding** attribute doesn't prevent you from setting the
77+
> `DefaultParameterSetName` to be to `__AllParameterSets`. If you do this,
78+
> PowerShell creates an explicit parameter set that can't be properly
79+
> referenced by the **Parameter** attribute.
8280
8381
## Examples
8482

reference/7.5/Microsoft.PowerShell.Core/About/about_Parameter_Sets.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,10 @@ Setting the `ParameterSetName` of a the **Parameter** attribute to
7373
cases the parameter belongs to all parameter sets.
7474

7575
> [!NOTE]
76-
> `DefaultParameterSetName` should not be explicitly set to `__AllParameterSets`.
77-
78-
The **CmdletBinding** attribute allows the `DefaultParameterSetName` to be
79-
explicitly set to `__AllParameterSets`. This is not recommended as it causes
80-
creation of an explicit parameter set which cannot be properly referenced by the
81-
**Parameter** attribute.
76+
> The **CmdletBinding** attribute doesn't prevent you from setting the
77+
> `DefaultParameterSetName` to be to `__AllParameterSets`. If you do this,
78+
> PowerShell creates an explicit parameter set that can't be properly
79+
> referenced by the **Parameter** attribute.
8280
8381
## Examples
8482

reference/7.6/Microsoft.PowerShell.Core/About/about_Parameter_Sets.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,10 @@ Setting the `ParameterSetName` of a the **Parameter** attribute to
7373
cases the parameter belongs to all parameter sets.
7474

7575
> [!NOTE]
76-
> `DefaultParameterSetName` should not be explicitly set to `__AllParameterSets`.
77-
78-
The **CmdletBinding** attribute allows the `DefaultParameterSetName` to be
79-
explicitly set to `__AllParameterSets`. This is not recommended as it causes
80-
creation of an explicit parameter set which cannot be properly referenced by the
81-
**Parameter** attribute.
76+
> The **CmdletBinding** attribute doesn't prevent you from setting the
77+
> `DefaultParameterSetName` to be to `__AllParameterSets`. If you do this,
78+
> PowerShell creates an explicit parameter set that can't be properly
79+
> referenced by the **Parameter** attribute.
8280
8381
## Examples
8482

0 commit comments

Comments
 (0)