description | ms.custom | ms.date | ms.topic | title |
---|---|---|---|---|
Reserved Parameters |
PSSA v1.22.0 |
03/06/2024 |
reference |
ReservedParams |
Severity Level: Error
You can't redefine common parameters in an advanced function. Using the CmdletBinding
or
Parameter
attributes creates an advanced function. The common parameters are are automatically
available in advanced functions, so you can't redefine them.
Change the name of the parameter.
function Test
{
[CmdletBinding()]
Param
(
$ErrorVariable,
$Parameter2
)
}
function Test
{
[CmdletBinding()]
Param
(
$Err,
$Parameter2
)
}