Skip to content

Commit ca9425f

Browse files
authored
Merge pull request #11989 from MicrosoftDocs/main
4/10/2025 PM Publish
2 parents 44770b4 + 3f3cbea commit ca9425f

File tree

4 files changed

+48
-40
lines changed

4 files changed

+48
-40
lines changed

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

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ The following requirements apply to all parameter sets.
3333
unique positions for each parameter. No two positional parameters can specify
3434
the same position.
3535

36-
- Only one parameter in a set can declare the `ValueFromPipeline` keyword with
37-
a value of `true`. Multiple parameters can define the
38-
`ValueFromPipelineByPropertyName` keyword with a value of `true`.
39-
4036
> [!NOTE]
4137
> There is a limit of 32 parameter sets.
4238
@@ -69,12 +65,18 @@ parameter sets.
6965
PowerShell reserves the parameter set name `__AllParameterSets` for special
7066
handling.
7167

72-
- This name is the default name of the parameter set that when you don't
73-
explicitly define a parameter set name.
74-
- When you have muliple parameter sets, you can use this name to define a
75-
parameter that belongs to all parameter sets.
76-
- Setting **DefaultParameterSetName** to `__AllParameterSets` in the
77-
`[CmdletBinding()]` attribute has no effect.
68+
`__AllParameterSets` is the name of the default parameter set when an explicit
69+
default name is not used.
70+
71+
Setting the `ParameterSetName` of a the **Parameter** attribute to
72+
`__AllParameterSets` is equivalent to not assigning a `ParameterSetName`. In
73+
both cases the parameter belongs to all parameter sets.
74+
75+
> [!NOTE]
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.
7880
7981
## Examples
8082

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

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ The following requirements apply to all parameter sets.
3333
unique positions for each parameter. No two positional parameters can specify
3434
the same position.
3535

36-
- Only one parameter in a set can declare the `ValueFromPipeline` keyword with
37-
a value of `true`. Multiple parameters can define the
38-
`ValueFromPipelineByPropertyName` keyword with a value of `true`.
39-
4036
> [!NOTE]
4137
> There is a limit of 32 parameter sets.
4238
@@ -69,12 +65,18 @@ parameter sets.
6965
PowerShell reserves the parameter set name `__AllParameterSets` for special
7066
handling.
7167

72-
- This name is the default name of the parameter set that when you don't
73-
explicitly define a parameter set name.
74-
- When you have muliple parameter sets, you can use this name to define a
75-
parameter that belongs to all parameter sets.
76-
- Setting **DefaultParameterSetName** to `__AllParameterSets` in the
77-
`[CmdletBinding()]` attribute has no effect.
68+
`__AllParameterSets` is the name of the default parameter set when an explicit
69+
default name is not used.
70+
71+
Setting the `ParameterSetName` of a the **Parameter** attribute to
72+
`__AllParameterSets` is equivalent to not assigning a `ParameterSetName`. In
73+
both cases the parameter belongs to all parameter sets.
74+
75+
> [!NOTE]
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.
7880
7981
## Examples
8082

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

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ The following requirements apply to all parameter sets.
3333
unique positions for each parameter. No two positional parameters can specify
3434
the same position.
3535

36-
- Only one parameter in a set can declare the `ValueFromPipeline` keyword with
37-
a value of `true`. Multiple parameters can define the
38-
`ValueFromPipelineByPropertyName` keyword with a value of `true`.
39-
4036
> [!NOTE]
4137
> There is a limit of 32 parameter sets.
4238
@@ -69,12 +65,18 @@ parameter sets.
6965
PowerShell reserves the parameter set name `__AllParameterSets` for special
7066
handling.
7167

72-
- This name is the default name of the parameter set that when you don't
73-
explicitly define a parameter set name.
74-
- When you have muliple parameter sets, you can use this name to define a
75-
parameter that belongs to all parameter sets.
76-
- Setting **DefaultParameterSetName** to `__AllParameterSets` in the
77-
`[CmdletBinding()]` attribute has no effect.
68+
`__AllParameterSets` is the name of the default parameter set when an explicit
69+
default name is not used.
70+
71+
Setting the `ParameterSetName` of a the **Parameter** attribute to
72+
`__AllParameterSets` is equivalent to not assigning a `ParameterSetName`. In
73+
both cases the parameter belongs to all parameter sets.
74+
75+
> [!NOTE]
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.
7880
7981
## Examples
8082

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

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ The following requirements apply to all parameter sets.
3333
unique positions for each parameter. No two positional parameters can specify
3434
the same position.
3535

36-
- Only one parameter in a set can declare the `ValueFromPipeline` keyword with
37-
a value of `true`. Multiple parameters can define the
38-
`ValueFromPipelineByPropertyName` keyword with a value of `true`.
39-
4036
> [!NOTE]
4137
> There is a limit of 32 parameter sets.
4238
@@ -69,12 +65,18 @@ parameter sets.
6965
PowerShell reserves the parameter set name `__AllParameterSets` for special
7066
handling.
7167

72-
- This name is the default name of the parameter set that when you don't
73-
explicitly define a parameter set name.
74-
- When you have muliple parameter sets, you can use this name to define a
75-
parameter that belongs to all parameter sets.
76-
- Setting **DefaultParameterSetName** to `__AllParameterSets` in the
77-
`[CmdletBinding()]` attribute has no effect.
68+
`__AllParameterSets` is the name of the default parameter set when an explicit
69+
default name is not used.
70+
71+
Setting the `ParameterSetName` of a the **Parameter** attribute to
72+
`__AllParameterSets` is equivalent to not assigning a `ParameterSetName`. In
73+
both cases the parameter belongs to all parameter sets.
74+
75+
> [!NOTE]
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.
7880
7981
## Examples
8082

0 commit comments

Comments
 (0)