| description | Avoid multiple type specifiers on parameters. |
|---|---|
| ms.date | 06/28/2023 |
| ms.topic | reference |
| title | AvoidMultipleTypeAttributes |
Severity Level: Warning
Parameters should not have more than one type specifier. Multiple type specifiers on parameters can cause runtime errors.
Ensure each parameter has only 1 type specifier.
function Test-Script
{
[CmdletBinding()]
Param
(
[switch]
[int]
$Switch
)
}function Test-Script
{
[CmdletBinding()]
Param
(
[switch]
$Switch
)
}