File tree Expand file tree Collapse file tree 4 files changed +60
-16
lines changed
5.1/Microsoft.PowerShell.Core/About
7.4/Microsoft.PowerShell.Core/About
7.5/Microsoft.PowerShell.Core/About
7.6/Microsoft.PowerShell.Core/About Expand file tree Collapse file tree 4 files changed +60
-16
lines changed Original file line number Diff line number Diff line change 11---
22description : Describes how to define and use parameter sets in advanced functions.
33Locale : en-US
4- ms.date : 03/27/2024
4+ ms.date : 03/26/2025
55online version : https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_parameter_sets?view=powershell-5.1&WT.mc_id=ps-gethelp
66title : about_Parameter_Sets
77---
@@ -64,12 +64,23 @@ one unique parameter.
6464Parameters that don't have an assigned parameter set name belong to all
6565parameter sets.
6666
67+ ## Reserved parameter set name
68+
69+ PowerShell reserves the parameter set name ` __AllParameterSets ` for special
70+ handling.
71+
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.
78+
6779## Examples
6880
6981The following example function counts the number lines, characters, and words
70- in a text file. Using parameters, you can specify which values you want
71- returned and which files you want to measure. There are four parameter sets
72- defined:
82+ in a text file. Using parameters, you can specify the values you want returned
83+ and the files you want to measure. There are four parameter sets defined:
7384
7485- Path
7586- PathAll
Original file line number Diff line number Diff line change 11---
22description : Describes how to define and use parameter sets in advanced functions.
33Locale : en-US
4- ms.date : 03/27/2024
4+ ms.date : 03/26/2025
55online version : https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_parameter_sets?view=powershell-7.4&WT.mc_id=ps-gethelp
66title : about_Parameter_Sets
77---
@@ -64,12 +64,23 @@ one unique parameter.
6464Parameters that don't have an assigned parameter set name belong to all
6565parameter sets.
6666
67+ ## Reserved parameter set name
68+
69+ PowerShell reserves the parameter set name ` __AllParameterSets ` for special
70+ handling.
71+
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.
78+
6779## Examples
6880
6981The following example function counts the number lines, characters, and words
70- in a text file. Using parameters, you can specify which values you want
71- returned and which files you want to measure. There are four parameter sets
72- defined:
82+ in a text file. Using parameters, you can specify the values you want returned
83+ and the files you want to measure. There are four parameter sets defined:
7384
7485- Path
7586- PathAll
Original file line number Diff line number Diff line change 11---
22description : Describes how to define and use parameter sets in advanced functions.
33Locale : en-US
4- ms.date : 03/27/2024
4+ ms.date : 03/26/2025
55online version : https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_parameter_sets?view=powershell-7.5&WT.mc_id=ps-gethelp
66title : about_Parameter_Sets
77---
@@ -64,12 +64,23 @@ one unique parameter.
6464Parameters that don't have an assigned parameter set name belong to all
6565parameter sets.
6666
67+ ## Reserved parameter set name
68+
69+ PowerShell reserves the parameter set name ` __AllParameterSets ` for special
70+ handling.
71+
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.
78+
6779## Examples
6880
6981The following example function counts the number lines, characters, and words
70- in a text file. Using parameters, you can specify which values you want
71- returned and which files you want to measure. There are four parameter sets
72- defined:
82+ in a text file. Using parameters, you can specify the values you want returned
83+ and the files you want to measure. There are four parameter sets defined:
7384
7485- Path
7586- PathAll
Original file line number Diff line number Diff line change 11---
22description : Describes how to define and use parameter sets in advanced functions.
33Locale : en-US
4- ms.date : 03/27/2024
4+ ms.date : 03/26/2025
55online version : https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_parameter_sets?view=powershell-7.6&WT.mc_id=ps-gethelp
66title : about_Parameter_Sets
77---
@@ -64,12 +64,23 @@ one unique parameter.
6464Parameters that don't have an assigned parameter set name belong to all
6565parameter sets.
6666
67+ ## Reserved parameter set name
68+
69+ PowerShell reserves the parameter set name ` __AllParameterSets ` for special
70+ handling.
71+
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.
78+
6779## Examples
6880
6981The following example function counts the number lines, characters, and words
70- in a text file. Using parameters, you can specify which values you want
71- returned and which files you want to measure. There are four parameter sets
72- defined:
82+ in a text file. Using parameters, you can specify the values you want returned
83+ and the files you want to measure. There are four parameter sets defined:
7384
7485- Path
7586- PathAll
You can’t perform that action at this time.
0 commit comments